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