Example #1
0
        public void CreateNotification()
        {
            var service = new NotificationService();
            var notification = new Notification()
            {
                //Description = "so i'm going to talk abou ta long release here, and the version",
                Description = "Release 1.1 coming soon oh yeah",
                Id = Guid.NewGuid(),
                Scope = NotificationScope.Everyone,
                Title = "New release 1.1 soon",
                Type = NotificationType.FrontPage
            };

            try
            {
                service.Create(notification);
            }
            catch (DbEntityValidationException e)
            {
                var messages = e.EntityValidationErrors;
            }
        }
Example #2
0
 public JsonResult Create(Notification notification)
 {
     _service.Create(notification, AppUser.Id);
     return SuccessResult(null);
 }
Example #3
0
 public IHttpActionResult Create(Notification notification)
 {
     _service.Create(notification, _externalUserId);
     return Json(true);
 }