public void SaveWarehouse(Warehouse Data) { using (var dbContext = new AuditDbContext()) { if (Data.ID > 0) { dbContext.Update <Warehouse>(Data); } else { dbContext.Insert <Warehouse>(Data); } } }
public void SaveScrap(Scrap Data) { using (var dbContext = new AuditDbContext()) { if (Data.ID > 0) { dbContext.Update <Scrap>(Data); } else { dbContext.Insert <Scrap>(Data); } } }