예제 #1
0
        public MoveDep Update(MoveDep updateMoveDep)
        {
            var MoveDep = context.MoveDeps.Attach(updateMoveDep);

            MoveDep.State = EntityState.Modified;
            context.SaveChanges();
            return(updateMoveDep);
        }
예제 #2
0
        public MoveDep Delete(string id)
        {
            MoveDep department = context.MoveDeps.Find(id);

            if (department != null)
            {
                context.MoveDeps.Remove(department);
                context.SaveChanges();
            }
            return(department);
        }
예제 #3
0
 public MoveDep Add(MoveDep move)
 {
     context.MoveDeps.Add(move);
     context.SaveChanges();
     return(move);
 }