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); }
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)); }