Skip to content

Instantly share code, notes, and snippets.

@Defcoq
Created June 6, 2021 14:30
Show Gist options
  • Save Defcoq/6f74e2e7457b27d27bbc21b7e8304768 to your computer and use it in GitHub Desktop.
Save Defcoq/6f74e2e7457b27d27bbc21b7e8304768 to your computer and use it in GitHub Desktop.
public class ProductRepository : Model.IProductRepository
{
public IList<Model.Product> FindAll()
{
var products = from p in new ITInnovDesign.SoC.Repository.ProductContext().Products
select new Model.Product
{
Id = p.ProductId,
Name = p.ProductName,
Price = new Model.Price(p.Rrp, p.SellingPrice)
};
return products.ToList();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment