public async Task <int> AddItem(ItemBodyModel itemBodyModel) { try { return(await _connection.GetConnection.ExecuteAsync( sql : @"[Menu].[Usp_InsertItems]", param : itemBodyModel, commandType : CommandType.StoredProcedure )); } catch (Exception exception) { throw exception; } finally { _connection.Dispose(); } }
public async Task <int> AddItem(ItemBodyModel itemBodyModel) { return(await _menuItemReporitory.AddItem(itemBodyModel)); }
public async Task <IHttpActionResult> AddItem([FromBody] ItemBodyModel itemBodyModel) { return(Ok(await _menuItemService.AddItem(itemBodyModel))); }