Ejemplo n.º 1
0
        public Plan.Add FromRequest(Request.Add request)
        {
            var workPlan = new Plan.Recode(request.Requester, request.WorkDate.ToShortDateString(), request.WorkTime.ToString());
            var restPlan = new Plan.Recode(request.Requester, request.RestDate.ToShortDateString(), request.RestTime.ToString());

            return(new Plan.Add(workPlan, restPlan));
        }
Ejemplo n.º 2
0
 protected override async Task HandleAsync(Request.Add <TEntity> request, AppDbContext service,
                                           CancellationToken cancellationToken)
 {
     await service.AddAsync(request.Entity, cancellationToken);
 }