public async Task <bool> InsertOneProduct(Product product) { try { _msSqlDbContext.Products.Add(product); await _msSqlDbContext.SaveChangesAsync(); return(true); } catch (Exception ex) { throw ex; } }
public async Task <int> SaveChanges() { return(await context.SaveChangesAsync()); }