public async Task UpdateIssueTypeAsync(IssueTypeListItem issue) { var dbItem = await _context.IssueTypes.FirstAsync(p => p.Id == issue.Id); dbItem.Title = issue.Title; dbItem.Description = issue.Description; await _context.SaveChangesAsync(); }
public async Task InsertIssueTypeAsync(IssueTypeListItem issue) { await _context.IssueTypes.AddAsync(new IssueType { Title = issue.Title, Description = issue.Description }); await _context.SaveChangesAsync(); }