public void DeleteApplication(Guid applicationId) { try { var deletingApplication = _VaODbContext.Applications.Where(a => a.IdApplication == applicationId).FirstOrDefault(); _VaODbContext.Remove(deletingApplication); SaveChanges(); } catch { throw; } }
public void UnBanVolunteerByOrganizationId(Guid volunteerId, Guid orgId) { try { var deletingBan = _VaODbContext.Bans .Where(b => b.IdVolunteer == volunteerId /*&& b.IdOrganization == orgId*/) .FirstOrDefault(); _VaODbContext.Remove(deletingBan); SaveChanges(); } catch { throw; } }