public void Post([FromBody] MenuItemDto item) { MenuItem menuItem = new MenuItem { Description = item.Description, DisplayOrder = item.DisplayOrder, RoleId = item.RoleId, ParentId = item.ParentId, Url = item.Url, IsActive = item.IsActive }; _menuItemManager.Add(menuItem); }
public async Task <IActionResult> Add(MenuItemResponseModel menuItem) { await _menuItemManager.Add(menuItem); return(Ok()); }
public async Task <IActionResult> Add(MenuItemResponseModel menuItem) { int menuItemId = await _menuItemManager.Add(menuItem); return(Ok(new { Id = menuItemId })); }