Beispiel #1
0
        public static SaleUserViewModel ToViewModel(this AspNetUser entity)
        {
            var user = new SaleUserViewModel();

            user.Id   = entity.Id.ToString();
            user.Name = entity.DisplayName;
            user.Code = entity.Code;
            return(user);
        }
Beispiel #2
0
        public ActionResult GetCurrentSaleUsers()
        {
            var user = (ApplicationUser)this.CurrentUser;
            var data = new SaleUserViewModel
            {
                Id   = user.Id.ToString(),
                Name = user.DisplayName,
                Code = user.Code
            };

            return(new JsonCamelCaseResult(data, JsonRequestBehavior.AllowGet));
        }