Questions tagged [dapper-fastcrud]

Is the fastest micro-orm extension for Dapper, built around essential features of the C# 6 / VB 14 that have finally raised the simplicity of raw SQL constructs to acceptable maintenance levels. These features leave no chance to mistypings or problems arising from db entity refactorings.

From Dapper.FastCRUD's GitHub README:

Features:

  • Support for LocalDb, Ms Sql Server, MySql, SqLite, PostgreSql
  • Entities having composite primary keys are supported
  • Multiple entity mappings are supported, useful for partial queries in large denormalized tables and data migrations between different database types.
  • All the CRUD methods accept a transaction, a command timeout, and a custom entity mapping.
  • Fast pre-computed entity queries
  • A useful SQL builder and statement formatter which can be used even if you don't need the CRUD features of this library.
  • A generic T4 template for C# is also provided for convenience in the NuGet package Dapper.FastCrud.ModelGenerator. Code first entities are also supported which can either be decorated with attributes, have their mappings programmatically set, or using your own custom convention.
10 questions
4
votes
1 answer

Is there a way to map properties to column names using some .Insert extension method for Dapper?

I have the following challenge with this class: Public Class MyClass Property Id As Integer Property LastName as String End Class The corresponding data table in the database has as fields: Id (int, not null) Last-Name…
Dabblernl
  • 15,831
  • 18
  • 96
  • 148
4
votes
1 answer

DatabaseGeneratedOption doesn't work in Dapper.FastCRUD

I setup my mapping like this: [Table("Opportunity")] public partial class Opportunity { // Other columns ... [Key] [Column(Order = 1)] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public long OPPORTUNITY_ID { get;…
Bill Software Engineer
  • 7,362
  • 23
  • 91
  • 174
3
votes
2 answers

How to map C# enum to PostgreSQL enum using Dapper.FastCRUD?

I have a class Sample, one of whose properties is an enum, TargetType. I have a corresponding table samples defined in a PostgreSQL database, along with a matching enum type, targettypes. With Dapper.FastCRUD, I can retrieve records from the table…
Abir
  • 73
  • 1
  • 7
1
vote
1 answer

create query for mysql in Dapper FastCRUD

I want to use dapper fastcrud(DLL FOR CRUD Operation in dapper) with mariadb(mysql engine) but when i want to execute my code I have syntax Error It seems when fastcrud wants to create query ,it's default behaviour is creating query appropriate…
Spring98
  • 119
  • 2
  • 12
1
vote
1 answer

Dapper FastCRUD with object inheritance

I am using Dapper FastCRUD for insert/update for my project. I have a entity which inherits from another entity. Both of them have separate destination tables, annotated with TableAttribute. Is there a way to save data to both the tables using Fast…
tj_abe
  • 25
  • 3
1
vote
1 answer

How to write sql code with fastcrud?

classes: [Table("department_types", Schema = "public")] public class DepartmentTypes [Table("departments", Schema = "public")] public class Department query: private string BuildQuery() { return…
Alex
  • 1,013
  • 1
  • 13
  • 27
0
votes
1 answer

Dapper.FastCrud InsertAsync doesn't update identity column

I am doing an InserAsync and the SQL query returns the generated Id but the entity has zero for its integer identity column. Why is it not updating the identity column? It works when it's Insert but not when it's InsertAsync. Such is life...
Ian Warburton
  • 15,170
  • 23
  • 107
  • 189
0
votes
2 answers

Add AttachToTransaction to action in FastCrud

I'm trying to make a UnitOfWork/Repository pattern using fastcrud. I have created a generic repository public interface IRepository where T : BaseEntity { IDbTransaction Transaction { get; set; } T Get(T entityKeys,…
Trixz
  • 190
  • 13
0
votes
2 answers

dapper.fastcrud doesn't mapped geometry data from postgresql

I have a spatial data in Postgresql. For example table planet_osm_point has 2 attributes: CREATE TABLE public.planet_osm_point ( osm_id bigint, way geometry(Point,3857) ) If I use dapper to CRUD operations all work fine. But if I use…
-1
votes
1 answer

Create domain partition with Dapper FastCrud ModelGenerator

Our Sql Server database has multiple schemas/owners. Some of the table names are identical without the schema so when configuring the Model Generator I would like to be able to either filter by schema or append the schema name to the table so there…
Eric Carlson
  • 761
  • 1
  • 6
  • 11