Dapper Extensions Change Schema

Posted 每天都有新发现

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Dapper Extensions Change Schema相关的知识,希望对你有一定的参考价值。

Dapper Extensions Change Schema

 You can use the AutoClassMapper to assign a new schema to your model. An overview on this is on the extensions site. You will basically need to create an AutoClassMapper per model with a different schema. The best place to declare it is alongside your model itself like:

 

public class MyModel 
{
  public Guid Id { get; set; } 
}

public class MyModelMapper : AutoClassMapper<MyModel>
{
  public MyModelMapper() : base()
  {
    Schema("YourNewSchema");
  }
}

  

以上是关于Dapper Extensions Change Schema的主要内容,如果未能解决你的问题,请参考以下文章

Dapper Extensions Predicates

csharp: mappings using Dapper-Extensions+Dapper.net.

dapper-extensions GetList() with (nolock)

如何在不明确指定主键的情况下使用 Dapper Extensions 将对象插入 PostGreSql?

dapper.contrib 是不是支持 varchar 类型的主键?

2021-07-14 .NET高级班 108-Dapper的使用