예제 #1
0
        public void Add(UserFull p_userFull)
        {
            var Temp = MapperUserFull.MapUserFullToUSREntity(p_userFull);

            using (var db = new MES_DATABASE())
            {
                db.USR_UserList.Add(Temp);
                db.SaveChanges();
            }
        }
예제 #2
0
        public void Edit(UserFull p_userFull)
        {
            var Temp = MapperUserFull.MapUserFullToUSREntity(p_userFull);

            using (var db = new MES_DATABASE())
            {
                db.USR_UserList.Attach(Temp);
                db.Entry(Temp).State = EntityState.Modified;
                db.SaveChanges();
            }
        }