コード例 #1
0
ファイル: UserRepository.cs プロジェクト: vegashat/Pulsey
 public bool InsertUserProfile(User objUser)
 {
     using (var context = new PulseyContext())
     {
         context.Users.Add(objUser);
         context.SaveChanges();
     }
     return true;
 }
コード例 #2
0
ファイル: UserRepository.cs プロジェクト: vegashat/Pulsey
 public bool UpdateUserProfile(User objUser)
 {
     using (var context = new PulseyContext())
     {
         context.Entry<User>(objUser).State = EntityState.Modified;
         context.SaveChanges();
     }
     return true;
 }
コード例 #3
0
ファイル: UserController.cs プロジェクト: vegashat/Pulsey
 public ActionResult UserProfile(User user)
 {
     var repo = new UserRepository();
     repo.InsertUserProfile(user);
     return View();
 }