public ActionResult Get() { var userId = User.Identity.GetUserId(); var data = PipelineService.Query <ProjectsQueries>().With(q => q.GetByUserDto(userId)); return(Json(data, JsonRequestBehavior.AllowGet)); }
public ActionResult Index(bool isUpdated = false) { ViewBag.StatusMessage = isUpdated ? "Profile updated" : string.Empty; var userId = User.Identity.GetUserId(); var model = new UpdateUserCommand(PipelineService.Query(userQueries).With(q => q.GetById(userId))); return(View(model)); }
public ActionResult Put(UpdateTaskCommand command) { var userId = User.Identity.GetUserId(); command.UserId = userId; PipelineService.HandleCommand(command); var data = PipelineService.Query <TasksQueries>().With(q => q.GetByIdDto(command.Id)); return(Json(data)); }
public ActionResult Remove(int id) { var project = PipelineService.Query <ProjectsQueries>().With(q => q.GetById(id)); if (project == null) { return(HttpNotFound()); } return(View(project)); }
public ActionResult Edit(int id) { var project = PipelineService.Query <ProjectsQueries>().With(q => q.GetById(id)); if (project == null) { return(HttpNotFound()); } return(View(new UpdateProjectCommand() { ProjectId = project.Id, Color = project.Color, Name = project.Name, })); }
public ActionResult Index(int page = 1) { var userId = User.Identity.GetUserId(); return(View(PipelineService.Query <ProjectsQueries>().With(q => q.GetByUser(userId, page, 10)))); }