public User GetUser(Guid id) { var query = new UserByIdQuery(dbContext.Users); var user = query.Execute(id); if (user == null) { throw new EntityNotFoundException("User", id); } return user; }
public User GetUser(Guid userId) { var query = new UserByIdQuery(dbContext.Users); var user = query.Execute(userId); if (user == null) { throw new EntityNotFoundException("User", userId); } return new UserMapper().Map(query.Execute(userId)); }