Linq extensions examplified
This commit is contained in:
19
Linq_examples/BookRepository.cs
Normal file
19
Linq_examples/BookRepository.cs
Normal file
@ -0,0 +1,19 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Linq_examples
|
||||
{
|
||||
public class BookRepository
|
||||
{
|
||||
public IEnumerable<Book> GetBooks()
|
||||
{
|
||||
return new List<Book>
|
||||
{
|
||||
new Book(){Title="ADO.Net Step by step", Price=5},
|
||||
new Book(){Title="ASP.Net MVC", Price=9.99f},
|
||||
new Book(){Title="ASP.Net Web API", Price=12},
|
||||
new Book(){Title="C# Advanced topics", Price=7},
|
||||
new Book(){Title="C# Advanced topics", Price=9}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user