internal static string[] GetSchemaMapping(this DbClassInfoCache type) { if (IsAnonymousType(type)) { return(type.GetPropertiesEx().Select(s => s.Name).ToArray()); } return(type.LocalToDbSchemaMapping()); }
/// <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))); }