Ejemplo n.º 1
0
        //inserting notification
        public notification InsertNotification(notification notify)
        {
            var notifyResponse = db.notifications.Add(notify);

            db.SaveChanges();

            return(notifyResponse);
        }
Ejemplo n.º 2
0
        //return pos details
        public PosDTO GetPos(PosDTO Pos)
        {
            PosDTO posActivation = new PosDTO();
            var    Posdetails    = _db.pos.Where(c => c.ActivationCode == Pos.ActivationCode)
                                   .SingleOrDefault();

            if (Posdetails == null)
            {
                return(posActivation);
            }

            Posdetails.Activation = true;

            _db.SaveChanges();

            posActivation = Mapper.Map <pos, PosDTO>(Posdetails);

            return(posActivation);
        }