public static TResult Execute <TResult>(Func <DB, TResult> lambda) { using (var ctx = new TableContext()) { var db = new DB(ctx); return(lambda(arg: db)); } }
public Repository(TableContext db) { this.db = db; }
public DB(TableContext table) { this.table = table; this.Lines = new Repository <Line, int>(table); }