Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. public virtual ICollection<Author> Authors { get; set; }
  2.  
  3. public virtual ICollection<Publication> Publications { get; set; }
  4.  
  5. Models.Author[] auth = db.Authors.Where(p => p.FullName.ToLower()
  6. .Contains(searchAuthor).ToLower())).ToArray();
  7.  
  8. return PartialView("_PublicationList", await db.Publications
  9. .Where(p => p.Authors.ToList().Contains(auth[0])).ToListAsync());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement