Exemple #1
0
 public void UpdateUser(User user)
 {
     using (var ctx = new PlatineContext())
     {
         ctx.Entry(user).State = System.Data.Entity.EntityState.Modified;
         ctx.SaveChanges();
     }
 }
Exemple #2
0
 public void UpdateEducation(Education education)
 {
     using (var ctx = new PlatineContext())
     {
         ctx.Entry(education).State = System.Data.Entity.EntityState.Modified;
         ctx.SaveChanges();
     }
 }
Exemple #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();
            }
        }