public async Task <StatusCodeResult> UpdateExpenditure([FromBody] EditableTimeAndExpenceExpenditure coolz,
                                                               [FromRoute(Name = "time-and-expence-expenditure-id")] Guid expId)
        {
            var match = _repo.FindById(expId);

            _repo.AddOrUpdate(new TimeAndExpenceExpenditure()
            {
                Id           = expId,
                WeekId       = match.WeekId,
                EmployeeId   = match.EmployeeId,
                JobId        = match.JobId,
                LastModified = DateTimeOffset.Now,
                Amount       = coolz.Amount,
            }, x => x.Id);
            return(Ok());
        }
 public UpdateTimeAndExpenseExpenditureMessage(EditableTimeAndExpenceExpenditure model,
                                               Guid miscExpId)
 {
     Model = model;
     this.ExternalExpenditureId = miscExpId;
 }
 public async Task <ActionResult <TimeAndExpenceExpenditure> > CreateExpenditure([FromBody] EditableTimeAndExpenceExpenditure coolz,
                                                                                 [FromRoute(Name = "week-id")] int weekId,
                                                                                 [FromRoute(Name = "employee-id")] int employeeId,
                                                                                 [FromRoute(Name = "job-id")] int jobId)
 {
     return(Ok(_repo.AddOrUpdate(new TimeAndExpenceExpenditure()
     {
         Id = Guid.NewGuid(),
         WeekId = weekId,
         EmployeeId = employeeId,
         JobId = jobId,
         LastModified = DateTimeOffset.Now,
         Amount = coolz.Amount
     }, x => x.Id)));
 }