Questions tagged [dapper-simplecrud]

SimpleCRUD provides simple CRUD helpers for Dapper.

15 questions
4
votes
1 answer

How to set Schema name using Dapper.SimpleCrud?

I am using Dapper.SimpleCrud. Does anyone know how to set the schema name for a table? I have looked through the documentation but I have not found anything relating to setting or changing the schema name. public class doc_info { public int…
Weston Goodwin
  • 781
  • 3
  • 12
4
votes
1 answer

Dapper yielding different results

I have a table : create table scheduled_task ( scheduled_task_id serial primary key, description varchar(255), predicate varchar(10485760), path varchar(255), scheduled_task_type_id int references scheduled_task_type…
WynDiesel
  • 1,104
  • 7
  • 38
3
votes
1 answer

Dapper with Oracle give ORA-00936: missing expression error

I am using Dapper, with Dapper.Extensions and Dapper.SimpleCRUD. The following code works fine when running against a MYSQL database. However when I run the same code with the same tables against oracle I get ORA-00936: missing expression error. …
Weston Goodwin
  • 781
  • 3
  • 12
3
votes
2 answers

Dapper.SimpleCRUD Insert issue without identity

I have table User CREATE TABLE [User]( [Id] [int] primary key NOT NULL, [Username] [nvarchar](50) NULL, [EmailID] [nvarchar](50) NULL) User class public class User { public int Id { get; set; } public string Username { get; set;…
Deepak Saralaya
  • 457
  • 4
  • 12
2
votes
1 answer

Error trying to insert generic with Dapper.SimpleCRUD

I'm trying to create a generic base class for my DataObjects like this : public abstract class BaseDataObject where TDOType : class { public static TDOType Get(Guid lObjectUUID, NpgsqlConnection conn) { return…
WynDiesel
  • 1,104
  • 7
  • 38
2
votes
1 answer

Dapper w/ SIMPLECrud: GetList with WHERE behaving like LIKE instead of =

I have this method: public static IEnumerable GetList(string where, Dictionary parameters) { IEnumerable entities; using (var connection = OpenConnection()) { entities =…
Casey Crookston
  • 13,016
  • 24
  • 107
  • 193
1
vote
1 answer

Cannot pass object to Dapper.SimpleCrud insert

I am using Dapper with the Dapper.SimpleCrud extension. In my Dapper class, I have made an abstraction of the insert method, like this: public static int Insert(object entity) { try { using (SqlConnection sqlConnection = new…
hellogoodnight
  • 1,989
  • 7
  • 29
  • 57
1
vote
2 answers

SCOPE_IDENTITY Exception

I have been evaluating the use of dapper and the simplecrud extension with sqlite. No matter what I try when doing a table insert things fail with an exception no such function SCOPE_IDENTITY Table class public class User { public int Id {…
hypothesys
  • 11
  • 1
  • 1
1
vote
1 answer

Dapper.SqlMapper.AddTypeHandler appears not to be called with Postgres SimpleCRUD where clause

I have just upgraded from Npgsql v2.2.3 to v3.2.4.1 (now V3.2.5) on a system using Dapper and SimpleCRUD - other absent developers customised version of latter. Its not really my field - I was just trying to do some PostGIS bits with the v3…
user8377550
1
vote
1 answer

How to configure Dapper for Multi-tenant tables?

I have multi-tenant table structure whereas each table has TenantId and I am using Dapper as the only ORM along with SimpleCRUD (helper sits on the top of dapper). If possible (by default) I prefer every Read Query MUST pass the TenantId as a…
Coder Absolute
  • 5,417
  • 5
  • 26
  • 41
1
vote
1 answer

How to setup my code as DB First in an ORM

I have looked at using EF, nHibernate and Dapper/Dapper.SimpleCRUD. In none of them can I figure out how to represent my use case in regards to my database (SQL Server 2012) model. I am building an ASP.NET website with a grid in C# 4.0/.NET 4.0…
1
vote
1 answer

Dapper SimpleCRUD custom handlers ignored

If I execute queries with SimpleCRUD i.e., connection.GetList<_type>(); , then my custom type handlers are never executed. If I execute the same query directly with connection.Query<_type>(queryString), then my custom handlers get called without any…
Faheem
  • 1,423
  • 2
  • 13
  • 22
0
votes
2 answers

How to use Dapper LINQ with TableDirect (without embedded SQL) with ORACLE?

I tried DapperExtensions, Dapper.Extensions.Linq and linq2dapper to no avail. I will try Dapper.SimpleCRUD-with-Oracle. I will probably settle with a Stored Procedure instead. I want to use TableDirect with no embedded SQL statement. How can I use…
kblau
  • 2,094
  • 1
  • 8
  • 20
0
votes
3 answers

Dapper / SimpleCRUD Insert with VARCHAR primary key throwing FormatException - "The string was not in a correct format"

I am trying to insert into a postgresql database using dapper and simplecrud. My entity has a VARCHAR primary key, which I understand means that I have to include the [Key] and [Required] tags within my POCO. [Table("tube_data")] class Tube :…
-1
votes
1 answer

Dapper SimpleCRUD casts: "Unable to cast object of type 'System.Guid' to type 'System.IConvertible'."

I'm building an API for basic CRUD operations on a database table. I'm using C# in an ASP.NET Web API project and my service classes live in a separate class library. Dapper and Dapper.SimpleCRUD used for ORM operations. When I hard code a guid into…
Ryan
  • 393
  • 7
  • 22