/// <summary>Gets the name of the user by user.</summary> /// <param name="UserName">Name of the user.</param> /// <returns></returns> public AppUser GetUserByUserName(string UserName) { var User = AppUsers .FirstOrDefault(m => m.UserName == UserName); return(User); }