daily pastebin goal
41%
SHARE
TWEET

Untitled

a guest Jan 20th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class UserProfile
  2.     {
  3.         [Key]
  4.         [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
  5.         public int UserId { get; set; }
  6.         public string UserName { get; set; }
  7.  
  8.         //Added to round out requirements for site user profile
  9.         public string FirstName { get; set; }
  10.         public string LastName { get; set; }
  11.         public string Site { get; set; }
  12.     }
  13.    
  14. var context = new UsersContext();
  15. var curuser = context.UserProfiles.First(p => p.UserName == model.UserName);
  16. Session["FName"] = curuser.FirstName;
  17.    
  18. @HttpContext.Current.Session["FName"].ToString()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top