internal async Task <JsonResult> ItemAttributeDelete(itemAttributedeleteModel icdm) { SqlConnection cn = null; try { cn = Connection.GetConnection(); SqlCommand smd = new SqlCommand("[item_attribute_delete]", cn) { CommandType = CommandType.StoredProcedure }; smd.Parameters.AddWithValue("@attribute_no", icdm.attribute_no); smd.Parameters.Add("@jsonOutput", SqlDbType.NVarChar, -1).Direction = ParameterDirection.Output; // Execute the command await smd.ExecuteNonQueryAsync().ConfigureAwait(false); // Get the values string json = smd.Parameters["@jsonOutput"].Value.ToString(); smd.Dispose(); JArray arr = JArray.Parse(json); return(new JsonResult(arr)); } catch (Exception) { throw; } finally { Connection.CloseConnection(ref cn); } }
public async Task <JsonResult> ItemAttributeDelete([FromBody] itemAttributedeleteModel icdm) { try { return(await _itemLogic.ItemAttributeDelete(icdm).ConfigureAwait(false)); } catch (Exception ee) { return(await _itemLogic.SendRespose("False", ee.Message).ConfigureAwait(false)); } }