public AssignmentDto GetAssignmentDto(DataAccess.Entities.Assignment assignment) { return(new AssignmentDto { Id = assignment.Id, AssigneeFirstName = assignment.Assignee?.FirstName, AssigneeLastName = assignment.Assignee?.LastName, Name = assignment.Name, Deadline = assignment?.Deadline, Status = assignment.Status }); }
public void CreateAssignment(ApplicationUser createdBy, ApplicationUser assignee, Epic epic, DateTime?deadline, string name, string description) { var assignment = new DataAccess.Entities.Assignment { Name = name, Description = description, Assignee = assignee, Deadline = deadline, Epic = epic }; repository.Create(assignment, createdBy); if (assignee != null && createdBy != assignee) { notificationService.CreateAssignedToTaskNotification(createdBy, assignee, assignment); } }