narsil/Tanshu.Accounts.Contracts/Data Contracts/SettingBO.cs

27 lines
753 B
C#

using NHibernate.Mapping.ByCode;
using NHibernate.Mapping.ByCode.Conformist;
using System;
namespace Tanshu.Accounts.Entities
{
public class Setting
{
public virtual Guid SettingID { get; set; }
public virtual string Name { get; set; }
public virtual string Details { get; set; }
}
public class SettingMap : ClassMapping<Setting>
{
public SettingMap()
{
Table("Settings");
Schema("dbo");
Lazy(false);
Id(x => x.SettingID, map => map.Generator(Generators.GuidComb));
Property(x => x.Name, map => { map.NotNullable(true); map.Unique(true); });
Property(x => x.Details, map => map.NotNullable(true));
}
}
}