예제 #1
0
 public void UpdateUser(User user)
 {
     using (var ctx = new PlatineContext())
     {
         ctx.Entry(user).State = System.Data.Entity.EntityState.Modified;
         ctx.SaveChanges();
     }
 }
예제 #2
0
 public void UpdateEducation(Education education)
 {
     using (var ctx = new PlatineContext())
     {
         ctx.Entry(education).State = System.Data.Entity.EntityState.Modified;
         ctx.SaveChanges();
     }
 }
예제 #3
0
        public void UpdateExperience(Experience experience, Guid userId)
        {
            using (var ctx = new PlatineContext())
            {
                if (!experience.UserId.Equals(userId))
                {
                    throw new NotAllowedException();
                }

                ctx.Entry(experience).State = System.Data.Entity.EntityState.Modified;
                ctx.SaveChanges();
            }
        }