public int DeleteSeller(SellerDeleteServiceInputModel 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.ExecuteReader( sql: "[dbo].[SellerDeleteProcedure]", param: dbParams, commandType: CommandType.StoredProcedure); return(1); } catch (Exception ex) { throw ex; } finally { con.Close(); } } }
public dynamic test(SellerDeleteServiceInputModel 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].[GetProductTypeFieldsById]", param: dbParams, commandType: CommandType.StoredProcedure); return(reader); } catch (Exception ex) { throw ex; } finally { con.Close(); } } }
public dynamic test(SellerDeleteServiceInputModel data) { return(_sellerRepository.test(data)); }
public IActionResult test(SellerDeleteServiceInputModel data) { return(Ok(_sellerService.test(data))); }
public int DeleteSellerService(SellerDeleteServiceInputModel data) { return(_sellerRepository.DeleteSeller(data)); }