public async Task DeleteReportAsync(int reportId) { var result = await dbContext.LabReports.Where(report => report.LabReportId == reportId).FirstOrDefaultAsync(); if (result != null) { result.isDeleted = true; await dbContext.SaveChangesAsync(); } }
public async Task DeleteProfileAsync(int profileId) { var profile = await dbContext.MemberProfiles.Where(p => p.ProfileID == profileId && p.IsDeleted == false).FirstOrDefaultAsync(); if (profile != null) { profile.IsDeleted = true; await dbContext.SaveChangesAsync(); } }