protected override NorthwindItemViewModelBase <Product> GetNorthwindItemViewModel(Product item, INorthwindServiceBase <Product> service, bool isNew = false)
 {
     return(new ProductViewModel(item));
 }
 protected override NorthwindItemViewModelBase <Order> GetNorthwindItemViewModel(Order item, INorthwindServiceBase <Order> service, bool isNew = false)
 {
     return(new OrderViewModel(item, this.ordersService));
 }
Example #3
0
 protected override NorthwindItemViewModelBase <Customer> GetNorthwindItemViewModel(Customer item, INorthwindServiceBase <Customer> service, bool isNew = false)
 {
     return(new CustomerViewModel(item));
 }
 protected override NorthwindItemViewModelBase <Customer> GetNorthwindItemViewModel(Customer item, INorthwindServiceBase <Customer> service)
 {
     return(new CustomerViewModelWithHierarchicalCommands(item));
 }
 protected override NorthwindItemViewModelBase <Employee> GetNorthwindItemViewModel(Employee item, INorthwindServiceBase <Employee> service, bool isNew = false)
 {
     return(new EmployeeViewModel(item));
 }
 public NorthwindItemViewModelBase(T item, INorthwindServiceBase <T> service, bool isNew = false)
 {
     this.service = service;
     this.item    = item;
     this.isNew   = isNew;
 }
 public NorthwindCollectionViewModelBase(INorthwindServiceBase <T> service)
 {
     this.service = service;
 }
 /// <summary>
 /// Instantiates a northwind item view model, override to provide a specific implementation
 /// </summary>
 /// <param name="item"></param>
 /// <param name="service"></param>
 /// <param name="isNew"></param>
 /// <returns></returns>
 protected virtual NorthwindItemViewModelBase <T> GetNorthwindItemViewModel(T item, INorthwindServiceBase <T> service, bool isNew = false)
 {
     return(new NorthwindItemViewModelBase <T>(item, this.service, isNew: isNew));
 }