public async Task <IActionResult> Events(int categoryId, int typeId = 1) { try { var dto = await _actionManager.GetEventsAsync(categoryId, typeId, User); var model = _mapper.Map <List <GeneralEventDTO>, List <GeneralEventViewModel> >(dto); return(View(model)); } catch { return(RedirectToAction("HandleError", "Error", new { code = 500 })); } }
public async Task <IActionResult> GetEvents(int typeId, int categoryId) { return(Ok(await _actionManager.GetEventsAsync(categoryId, typeId, await _userManager.GetUserAsync(User)))); }