public async Task <IActionResult> Edit(Guid id, [Bind("Id,UserId,BillingRate,Date,UpdatedAt")] BillingRateModel billingRateModel) { if (id != billingRateModel.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(billingRateModel); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!BillingRateModelExists(billingRateModel.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(billingRateModel)); }
public async Task <IActionResult> Edit(Guid id, [Bind("Id,UserId,StartTime,EndTime,WorkedTime,ProjectId,Note,Billable,CreatedAt,UpdatedAt,UpdatedBy")] WorkHourModel workHourModel) { if (id != workHourModel.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(workHourModel); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!WorkHourModelExists(workHourModel.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(workHourModel)); }