Example #1
0
        public Employement UpdateEmployment(Employement employment)
        {
            var employmentChanges = context.Employements.Attach(employment);

            employmentChanges.State = Microsoft.EntityFrameworkCore.EntityState.Modified;
            context.SaveChanges();
            return(employment);
        }
Example #2
0
 public Employement AddEmployment(Employement employment)
 {
     context.Employements.Add(employment);
     context.SaveChanges();
     return(employment);
 }