public async Task 引数無しで実行できる() { using (var context = NorthwindContext.CreateSQLite()) { var tmplSql = new EntityFrameworkSql(context); var result = await tmplSql.QueryAsync <Product>("TestFiles\\SelectAllProduct.tmpl.sql"); Assert.Equal(77, result.Count()); } }
public async Task パラメーターを指定して実行できる() { using (var context = NorthwindContext.CreateSQLite()) { var tmplSql = new EntityFrameworkSql(context); var result = await tmplSql.QueryAsync <Product>("TestFiles\\SelectProductByName.tmpl.sql", new Product() { ProductName = "Queso" }); Assert.Equal(2, result.Count()); } }
public EntityFrameworkSqlTest() { var context = NorthwindContext.CreateSQLite(); NorthwindData.CreateProducts(context); }