示例#1
0
        // GET: api/Notification
        public List <NotificationModel> GetNearbyByNotificationType(double Latitude, double Longitude, int NotificationTypeId)
        {
            var notifications = new Business.NotificationBusiness(new DB.NotificationDB());

            //return notif.GetNearby(Latitude, Longitude);
            return(SeedNotification(notifications.Get(Latitude, Longitude, NotificationTypeId)));
        }
示例#2
0
        // GET: api/Notification/5
        public Notification Get(int id)
        {
            var notif  = new Business.NotificationBusiness(new DB.NotificationDB());
            var filter = from r in notif.Get()
                         where r.Id == id
                         select r;

            return(filter.FirstOrDefault());
        }
示例#3
0
        // POST: api/Notification
        public bool Post(Notification value)
        {
            var notif = new Business.NotificationBusiness(new DB.NotificationDB());

            return(notif.Add(value));
        }