码迷,mamicode.com
首页 > 移动开发 > 详细

Dapper Extensions Change Schema

时间:2017-08-14 14:30:48      阅读:251      评论:0      收藏:0      [点我收藏+]

标签:gui   sch   mod   create   pre   its   schema   ace   nbsp   

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

标签:gui   sch   mod   create   pre   its   schema   ace   nbsp   

原文地址:http://www.cnblogs.com/dupeng0811/p/dapper-extensions-change-schema.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!