public async Task <bool> InsertOneProduct(Product product)
        {
            try
            {
                _msSqlDbContext.Products.Add(product);
                await _msSqlDbContext.SaveChangesAsync();

                return(true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemple #2
0
 public async Task <int> SaveChanges()
 {
     return(await context.SaveChangesAsync());
 }