public override PersonRegion GetPersonRegionByPersonAndRegion(Person person, Region region) { using (var transaction = new TransactionScope(_configuration)) { var prDS = new PersonRegionDataStore(transaction); return(prDS.FindByPersonAndRegion(person.Id, region.Id).FirstOrDefault()); } }
public override void DeletePersonFromRegion(string personId, string regionId) { using (var transaction = new TransactionScope(_configuration)) { var prDS = new PersonRegionDataStore(transaction); IList <PersonRegion> prs = prDS.FindByPersonAndRegion(personId, regionId); foreach (PersonRegion item in prs) { item.Deleted = true; prDS.Update(item); } transaction.Commit(); } }