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; } }
public JsonResult Create(Notification notification) { _service.Create(notification, AppUser.Id); return SuccessResult(null); }
public IHttpActionResult Create(Notification notification) { _service.Create(notification, _externalUserId); return Json(true); }