Views are mapped the same way tables are mapped except that you should put Readonly() in the mapping to prevent accidently writing to it. Example:

public class FeaturedCompanyMap : ClassMap<FeaturedCompany>
{
    public FeaturedCompanyMap ()
    {
       Table("FeaturedCompanies");
       ReadOnly();

       Id(x => x.Id);
       Map(x => x.Name);
       Map(x => x.Count);
    }
}

相关文章:

  • 2022-01-13
  • 2021-04-21
  • 2021-10-31
  • 2021-08-12
  • 2021-12-04
  • 2022-12-23
  • 2021-05-26
  • 2021-06-24
猜你喜欢
  • 2021-09-25
  • 2022-02-10
  • 2022-12-23
  • 2021-11-22
  • 2021-10-29
  • 2022-12-23
相关资源
相似解决方案