using System; using System.Linq; using System.Linq.Expressions; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using DevExpress.Mvvm; using DevExpress.Mvvm.POCO; using DevExpress.Mvvm.DataAnnotations; using System.Collections.ObjectModel; using System.Threading; using System.Threading.Tasks; using DevExpress.DevAV.Common.Utils; using DevExpress.Mvvm.ViewModel; using DevExpress.Mvvm.DataModel; namespace DevExpress.DevAV.Common.ViewModel { /// /// The base class for POCO view models exposing a collection of entities of the given type. /// This is a partial class that provides an extension point to add custom properties, commands and override methods without modifying the auto-generated code. /// /// A repository entity type. /// A projection entity type. /// A unit of work type. public abstract partial class EntitiesViewModel : EntitiesViewModelBase where TEntity : class where TProjection : class where TUnitOfWork : IUnitOfWork { /// /// Initializes a new instance of the EntitiesViewModel class. /// /// A factory used to create a unit of work instance. /// A function that returns a repository representing entities of the given type. /// A LINQ function used to customize a query for entities. The parameter, for example, can be used for sorting data and/or for projecting data to a custom type that does not match the repository entity type. protected EntitiesViewModel( IUnitOfWorkFactory unitOfWorkFactory, Func> getRepositoryFunc, Func, IQueryable> projection, UnitOfWorkPolicy unitOfWorkPolicy) : base(unitOfWorkFactory, getRepositoryFunc, projection, unitOfWorkPolicy) { } } }