private BackBone CreateBackBone() { var p = new Person { PersonId = Guid.NewGuid(), FirstName = "Testy", LastName = "Tester" }; var m = new Mortgage { MortgageId = Guid.NewGuid(), LenderName = "Testy Tester" }; var pty = new Property { PropertyId = Guid.NewGuid(), FullAddress = "Test Property" }; var bb = new BackBone { BackBoneId = Guid.NewGuid(), Person = p, PersonId = p.PersonId, Mortgage = m, MortgageId = m.MortgageId, Property = pty, PropertyId = pty.PropertyId }; return(bb); }
private void DropBackBone(O2DataMart db, BackBone bb) { db.Persons.Remove(db.Persons.Single(p => p.PersonId == bb.PersonId)); db.Properties.Remove(db.Properties.Single(p => p.PropertyId == bb.PropertyId)); db.Mortgages.Remove(db.Mortgages.Single(m => m.MortgageId == bb.MortgageId)); db.BackBones.Remove(db.BackBones.Single(b => b.BackBoneId == bb.BackBoneId)); }