public async Task <IActionResult> Index() { List <ApplicationUser> users = await _domainContext.Users.GetAll(); var model = new UserModelAssembler().ToModel(users); return(View(model)); }
public async Task <IActionResult> Edit(string id) { var entity = await this._domainContext.Users.Get(id); if (entity == null) { this.ModelState.AddModelError("", "Sorry, we cannot find the user."); return(View(new ApplicationUser())); } var model = new UserModelAssembler().ToModel(entity); return(View(model)); }