public async Task <ActionResult <Identity> > GetIdentity([FromRoute] int id) { try { Lib.Models.Identity identity = await _repo.GetIdentity(id); return(Ok(Mapper.Map(identity))); } catch (NotFoundException) { return(NotFound()); } }
public static Models.Identity Map(Lib.Models.Identity identity) { if (identity == null) { return(null); } return(new Models.Identity() { Id = identity.Id, Groups = Map(identity.Groups), Name = identity.Name }); }