예제 #1
0
        public CustomerViewModel Create(Customer entity, IPrincipal userInfo)
        {
            var appUser = userInfo?.GetApplicationUser(_httpContext);

            return(new CustomerViewModel
            {
                Id = entity.Id,
                Name = entity.Name,
                Email = appUser?.Email, //TODO MNY this should probably also be on the customer object.
                IsAuthenticated = userInfo?.Identity?.IsAuthenticated ?? false
            });
        }