Comments (1)
USE [TestDb]
GO
/****** Object: Table [dbo].[TestTable] Script Date: 11/10/2018 7:52:14 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TestTable](
[Id] [uniqueidentifier] NOT NULL,
[Value] nvarchar NOT NULL,
CONSTRAINT [PK_TestTable] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
INSERT INTO [dbo].[TestTable] ([Id], [Value]) SELECT NEWID(), 'Test-1';
INSERT INTO [dbo].[TestTable] ([Id], [Value]) SELECT NEWID(), 'Test-2';
INSERT INTO [dbo].[TestTable] ([Id], [Value]) SELECT NEWID(), 'Test-3';
using RepoDb;
using RepoDb.Attributes;
using System;
using System.Data.SqlClient;
namespace TestQueryRepoDb
{
[Map("TestTable")]
public class Test
{
public Guid Id { get; set; }
public string Value { get; set; }
}
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
using (var connection = new SqlConnection("Server=.;Database=TestDb;Integrated Security=True;"))
{
var tests = connection.Query<Test>();
}
}
}
}
from repodb.
Related Issues (20)
- Question: How to perform Identity Inserts when inserting an entity? HOT 2
- Expression is currently not supported. HOT 5
- Bug: <Memory Leak persist after update 1.13.1 > HOT 7
- Enhancement: Refactor Batch Operations SQL Statements HOT 8
- BaseRepository does not work with generic TDbConnection. HOT 9
- Bug: DirectionalQueryField broken in 1.13.1 HOT 2
- Request: Add support for VistaDB ( https://vistadb.com )
- the incoming request has too many parameters HOT 3
- Question: New setup, cannot get past MissingFieldsException HOT 1
- Is it possible to map private fields to table columns? HOT 3
- Bug: Retrieving `DateOnly` from reader is wrong
- Question: Is there any way to force RepoDb to cast enums to integers? HOT 2
- Question: How to hide properties
- Bug: Mapping field using quotes fails to insert
- Request: Support for mapping structs HOT 1
- Could you check for Nuget vulnerabilities please and update your dependencies
- Bug: Exception "A transaction is already in progress; nested/concurrent transactions aren't supported." when using TransactionScope with PostgreSQL bulk operations HOT 9
- Request: Specify supported SQL Server Versions
- Does RepoDB support the TimeOnly data type? HOT 1
- Expression 'GetValue' method is not work in parameterized anonymous object NewExpression case HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from repodb.