예제 #1
0
        private string GetMappingColumnName(PropertyInfo property, Type modelType)
        {
            string mappingColumnName = "";
            object attribute         = property.GetCustomAttributes(false)
                                       .Where(a => a is DBColumnAttribute)
                                       .First();

            mappingColumnName = ((DBColumnAttribute)attribute).ColumnName;
            if (mappingColumnName.Equals("Id"))
            {
                mappingColumnName = NamingService.GetIdName(modelType);
            }

            return(mappingColumnName);
        }
예제 #2
0
 public BaseRepository()
 {
     tableName = NamingService.GetTableNameFromRepository(this.GetType());
     idName    = NamingService.GetIdName(typeof(T));
 }
예제 #3
0
 public ORMExpressionBuilder(Dictionary <Type, MethodInfo> fromDBMethods, Dictionary <Type, MethodInfo> toDBMethods, Type modelType)
 {
     idName = NamingService.GetIdName(modelType);
     fromDBConversionMethods = fromDBMethods;
     toDBConversionMethods   = toDBMethods;
 }