public void Given2(string batchNumber, Table table) { using (var context = GenerateBulkCreditBus.CreateContext()) { var dbRows = table.CreateSet <DipsNabChq>(); foreach (var dbRow in dbRows) { context.NabChqPods.Add(dbRow); } context.SaveChanges(); } }
public void Given1(string batchNumber, Table table) { var batch = batchNumber.PadRight(8, ' '); using (var context = GenerateBulkCreditBus.CreateContext()) { context.Database.ExecuteSqlCommand("DELETE FROM [Queue] WHERE [S_BATCH] = @p0", batch); context.Database.ExecuteSqlCommand("DELETE FROM [NabChq] WHERE [S_BATCH] = @p0", batch); context.Database.ExecuteSqlCommand("DELETE FROM [DB_INDEX] WHERE [BATCH] = @p0", batch); var queue = table.CreateInstance <DipsQueue>(); context.Queues.Add(queue); context.SaveChanges(); } }