public int DeleteProductCategories(ProductCategoriesDeleteInputModel data) { using (var con = new SqlConnection(configuration.GetValue <string>("ConnectionString:SQLConnection"))) { try { var dbParams = new DynamicParameters(); con.Open(); dbParams.Add("@Id", data.Id); var reader = con.Query <dynamic>( sql: "[dbo].[ProductCategoriesDeleteProcedure]", param: dbParams, commandType: CommandType.StoredProcedure); return(1); } catch (Exception ex) { throw ex; } finally { con.Close(); } } }
public int DeleteProductCategoriesService(ProductCategoriesDeleteInputModel data) { return(_ProductRepository.DeleteProductCategories(data)); }
public IActionResult DeleteProductCategories(ProductCategoriesDeleteInputModel data) { return(Ok(_productService.DeleteProductCategoriesService(data))); }