public JsonResult GetCrmuser(Guid id) { var crmuser = crmuserRepository.GetSingle(where : new { Id = id }); crmuser = crmuser ?? new Crmuser(); var result = new { crmuser = crmuser }; return(Json(result)); }
public ActionResult UsernameIsAvailable(string userName) { var valid = _crmUserRepository.GetSingle(new { UserName = userName }) == null; return(Json(new { valid = valid })); }
public static Guid GetUserId(this System.Security.Principal.IIdentity identity) { var usr = allUsers.GetSingle(where : new { UserName = identity.Name }); return(usr != null? usr.Id : Guid.Empty); }