예제 #1
0
        internal static string[] GetSchemaMapping(this DbClassInfoCache type)
        {
            if (IsAnonymousType(type))
            {
                return(type.GetPropertiesEx().Select(s => s.Name).ToArray());
            }

            return(type.LocalToDbSchemaMapping());
        }
예제 #2
0
 /// <summary>
 ///     Maps all propertys of
 ///     <paramref name="type" />
 ///     into the Database columns
 /// </summary>
 /// <returns></returns>
 internal static IEnumerable <string> FilterDbSchemaMapping(this DbClassInfoCache type, params string[] ignore)
 {
     return(type.LocalToDbSchemaMapping().Where(f => !ignore.Contains(f)));
 }