Ejemplo n.º 1
0
 private async Task <Validation <Error, CourseAssignment> > Validate(CreateCourseAssignment create) =>
 (await CourseMustExist(create), await InstructorMustExist(create))
Ejemplo n.º 2
0
 public Task <Validation <Error, int> > Handle(CreateCourseAssignment request, CancellationToken cancellationToken) =>
 Validate(request)
 .Bind(v => v.Map(Persist).Traverse(i => i));