namespace SafeCampus.Application.Services.Business.PersonFacesService; public class PersonFacesService:DbRepository, IPersonFacesService { public async Task BatchAdd(List list) { var oldList = await GetListAsync(x => x.PersonId == list[0].PersonId); await DeleteAsync(oldList); await InsertRangeAsync(list); return true; } public async Task Add(PersonFaces entity) { await InsertAsync(entity); return true; } public async Task Delete(string personId, List faceIds) { var delList = await GetListAsync(x => x.PersonId == personId && faceIds.Contains(x.FaceId)); await DeleteAsync(delList); return true; } }