February 2018
Intermediate to advanced
668 pages
15h 18m
English
[Serializable]
public class Product
{
public int Id { get; set; }
public string Name { get; set; }
public decimal Price { get; set; }
}
[Serializable]
public class Basket
{
public List<Product> ListProducts { get; set; }
public decimal Total { get; set; }
public Basket()
{
ListProducts = new List<Product>();
Total = 0;
}
} public interface IProductRepository { IEnumerable<Product> GetProducts(); } public class ProductRepository : IProductRepository { private List<Product> _products; public ProductRepository() { _products = new List<Product>() { new Product { Id = 1, Name = "Laptop", ...