mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Add code to delete document people.
This commit is contained in:
@@ -23,5 +23,17 @@ namespace Marechai.Services
|
||||
Person = d.Person.FullName,
|
||||
PersonId = d.PersonId
|
||||
}).ToListAsync();
|
||||
|
||||
public async Task DeleteAsync(int id)
|
||||
{
|
||||
DocumentPerson item = await _context.DocumentPeople.FindAsync(id);
|
||||
|
||||
if(item is null)
|
||||
return;
|
||||
|
||||
_context.DocumentPeople.Remove(item);
|
||||
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user