public void TestInsertWithIDReturn_ScopeIdentity() { using (var c = Connection().OpenWithTransaction()) { var beer = Beer.GetSample(); c.Insert(Beer.InsertProcScopeIdentity, beer); beer.VerifySample(); } }
public void TestInsertWithIDReturn() { using (var c = Connection().OpenWithTransaction()) { var beer = Beer.GetSample(); c.InsertAsync(Beer.InsertProc, beer).Wait(); beer.VerifySample(); } }
public void TestInsertWithIDReturn_ScopeIdentity_SQL() { using (DbConnectionWrapper c = Connection().OpenWithTransaction()) { var beer = Beer.GetSample(); c.InsertSql("INSERT INTO[dbo].[Beer] ([Name], [Style]) VALUES(@Name , @Style ); SELECT SCOPE_IDENTITY() AS [Id]", beer); beer.VerifySample(); } }
public void TestInsertListWithIDReturn() { using (var c = Connection().OpenWithTransaction()) { var list = new List <Beer>(); list.Add(Beer.GetSample()); list.Add(Beer.GetSample()); c.InsertListAsync(Beer.InsertManyProc, list).Wait(); foreach (var beer in list) { beer.VerifySample(); } } }