Exemplo n.º 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();
            }
        }
Exemplo n.º 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();
            }
        }
Exemplo n.º 3
0
        public bool GetInformation(int p_Id)
        {
            ProfileFull = new UserFull();
            bool isFound = false;

            using (var db = new MES_DATABASE())
            {
                var result = db.USR_UserList.FirstOrDefault(x => x.ID_USR == p_Id);
                ProfileFull = MapperUserFull.MapUSREntityToUserFull(result);
                isFound     = true;
            }
            return(isFound);
        }