internal ITable getSourceTable(PropertyInfo prop) { if (sourceTables == null) { sourceTables = ReferenceSources.ToDictionary(s => s, s => db.GetTable(s.PropertyType.GetGenericArguments()[0])); } return(sourceTables[prop]); }
public ForeignKeyReader(FastDatabase db, Type referencedType) { this.db = db; referencedTable = db.GetTable(referencedType); if (referencedTable == null) { referencedTable = new EmptyTable <Entity>(); } Type = referencedType; }
public MultiKeyReader(FastDatabase db) { this.db = db; referencedTable = db.GetTable(typeof(TSource)); this.Type = typeof(TSource); var postSetProp = typeof(TSource).GetProperties().SingleOrDefault(p => ForeignKey.Is(p) && ForeignKey.IsPostSet(p)); if (postSetProp != null) { postSetter = TableInfo.BuildSetAccessor(postSetProp.SetMethod); } }