//inserting notification public notification InsertNotification(notification notify) { var notifyResponse = db.notifications.Add(notify); db.SaveChanges(); return(notifyResponse); }
//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); }