/// <summary> /// 设置属性映射 /// </summary> /// <param name="setter">设置器</param> protected override void SetColumnMappers(IColumnMapSetter <Member> setter) { setter.Map(m => m.MemberId, ColumnAction.PrimaryAndIdentity); setter.Map(m => m.MemberName).DataType(length: 25); setter.Map(m => m.Sex, ColumnAction.Insert); setter.Map(m => m.AddTime, ColumnAction.Default); setter.Map(m => m.Points, ColumnAction.EditAndDefault); setter.Map(m => m.CategoryId, ColumnAction.Insert, "CatId"); }
/// <summary> /// 设置属性映射 /// </summary> /// <param name="setter">设置器</param> protected override void SetColumnMappers(IColumnMapSetter <Category> setter) { setter.Map(c => c.CategoryId, ColumnAction.PrimaryAndIdentity, "CatId"); setter.Map(c => c.CategoryName, ColumnAction.Insert, "CatName").DataType(length: 25); }
/// <summary> /// 设置属性映射 /// </summary> /// <param name="setter">设置器</param> protected override void SetColumnMappers(IColumnMapSetter <CompanyCategory> setter) { setter.Map(c => c.CategoryId, ColumnAction.PrimaryAndInsert); }