public async Task CreateInLibraryRelationshipAsync(Book book, Person person, InLibrary inLibrary)
 {
     if ((await this.GetRelated <Person, InLibrary>(b => b.Id == book.Id, p => p.Name == person.Name, inLibrary)).ToList().Count == 0)
     {
         await this.Relate <Person, InLibrary>(b => b.Id == book.Id, p => p.Name == person.Name, inLibrary);
     }
 }
 public async Task DeleteInLibraryRelationshipAsync(Book book, Person person, InLibrary inLibrary)
 {
     await this.DeleteRelationship <Person, InLibrary>(b => b.Id == book.Id, p => p.Name == person.Name, inLibrary);
 }
 public async Task <IEnumerable <Person> > GetInLibraryPersonRelationshipAsync(Book book, InLibrary inLibrary)
 {
     return(await this.GetAllRelated <Person, InLibrary>(b => b.Id == book.Id, new Person(), inLibrary));
 }
Esempio n. 4
0
 public async Task <IEnumerable <Book> > GetInLibraryBookRelationshipAsync(Person person, InLibrary inLibrary)
 {
     return(await this.GetAllRelated(p => p.Name == person.Name, new Book(), inLibrary));
 }