Ejemplo n.º 1
0
 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);
     }
 }
Ejemplo n.º 2
0
 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);
 }
Ejemplo n.º 3
0
 public async Task <IEnumerable <Person> > GetInLibraryPersonRelationshipAsync(Book book, InLibrary inLibrary)
 {
     return(await this.GetAllRelated <Person, InLibrary>(b => b.Id == book.Id, new Person(), inLibrary));
 }
Ejemplo 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));
 }