Ejemplo n.º 1
0
 public static string GenerateModel(string tablename, List<Field> list, CsClassStyle csClassStyle, string username)
 {
     if ((string.IsNullOrEmpty(tablename) || (list == null)) || (list.Count == 0))
     {
         return string.Empty;
     }
     if (csClassStyle.MemberStyle == CsClassMemberStyle.Field)
     {
         return GenerateFieldModel(list, tablename, username, csClassStyle.SupportWCF, csClassStyle.SupportEF);
     }
     if (csClassStyle.MemberStyle == CsClassMemberStyle.AutoProperty)
     {
         return GenerateAutoPropertyModel(list, tablename, username, csClassStyle.SupportWCF, csClassStyle.SupportEF);
     }
     return GeneratePropertyModel(list, tablename, username, csClassStyle.SupportWCF, csClassStyle.SupportEF);
 }
Ejemplo n.º 2
0
 public static string GenerateModel(string originWord, List<Field> list, CsClassStyle csClassStyle)
 {
     if ((string.IsNullOrEmpty(originWord) || (list == null)) || (list.Count == 0))
     {
         return string.Empty;
     }
     if (csClassStyle.MemberStyle == CsClassMemberStyle.Field)
     {
         return GenerateFieldModel(list, originWord, csClassStyle.SupportWCF);
     }
     if (csClassStyle.MemberStyle == CsClassMemberStyle.AutoProperty)
     {
         return GenerateAutoPropertyModel(list, originWord, csClassStyle.SupportWCF);
     }
     return GeneratePropertyModel(list, originWord, csClassStyle.SupportWCF);
 }