public void UpdateProduct(List <Helper.SpHelper.Product1.UpdatProduct> list_Updateproduct) { using (var context = new DomainModel.DTO.EF.onlineshopingEntities()) { try { context.Database.ExecuteSqlCommand(Model.Helper.SpHelper.Product1.Productsphelper.Usp_UpdateProduct, Model.Helper.SpHelper.Product1.Productsphelper.SetUpdateParameters(list_Updateproduct)); } catch (Exception) { throw; } } }
public string InsertProduct(List <Helper.SpHelper.Product1.Insertproduct> insertproducts) { using (var context = new DomainModel.DTO.EF.onlineshopingEntities()) { try { return((context.Database.ExecuteSqlCommand(Model.Helper.SpHelper.Product1.Productsphelper.Usp_InsertProduct, Model.Helper.SpHelper.Product1.Productsphelper.SetInsertParameters(insertproducts))).ToString()); } catch (Exception ex) { return(ex.ToString()); } finally { if (context != null) { context.Dispose(); } } } }