public override void Update(ProductViewModel product)
        {
            Product productToUpdate = NorthWindRepository.Get(product.ProductID);

            productToUpdate.ProductName = product.ProductName;
            NorthWindRepository.Commit();
        }
 public List <SupplierViewModel> SearchSuppilerByCompanyName(string name)
 {
     return(NorthWindRepository.Find(s => s.CompanyName.Contains(name))
            .Select(s => NorthwindConverter.ToSupplierViewModel(s))
            .ToList());
 }
 public List <ProductViewModel> SearchProductByName(string name)
 {
     return(NorthWindRepository.Find(p => p.ProductName.Contains(name))
            .Select(p => NorthwindConverter.ToProductViewModel(p))
            .ToList());
 }