/// <summary> /// Construct the viewmodel /// </summary> /// <param name="skus">List of SKUs to select</param> /// <param name="customers">List of customers to select</param> public LicenseCreateViewModel(List<Model.SKU> skus, List<Model.Customer> customers) { License = new LicenseViewModel(new Model.License()); SKUList = skus.ToSelectList(x => x.SkuId, x => x.SkuCode); CustomerList = customers.ToSelectList(x => x.ObjectId, x => x.Name); }
/// <summary> /// Construct the viewmodel /// </summary> /// <param name="skus">List of SKUs to select</param> /// <param name="customers">List of customers to select</param> public LicenseCreateViewModel(List <Model.SKU> skus, List <Model.Customer> customers) { License = new LicenseViewModel(new Model.License()); SKUList = skus.ToSelectList(x => x.SkuId, x => x.SkuCode); CustomerList = customers.ToSelectList(x => x.ObjectId, x => x.Name); }