public int DeleteProductType(ProductTypeDeleteInputModel 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].[ProductTypeDeleteProcedure]", param: dbParams, commandType: CommandType.StoredProcedure); return(1); } catch (Exception ex) { throw ex; } finally { con.Close(); } } }
public int DeleteProductTypeService(ProductTypeDeleteInputModel data) { return(_ProductRepository.DeleteProductType(data)); }
public IActionResult DeleteProductType(ProductTypeDeleteInputModel data) { return(Ok(_productService.DeleteProductTypeService(data))); }