Class ServiceBase<T>
- Namespace
- Rescope.Commerce.Core.Services
- Assembly
- Rescope.Commerce.Core.dll
public abstract class ServiceBase<T> : IService<T> where T : class, IEntity
Type Parameters
T
- Inheritance
-
ServiceBase<T>
- Implements
-
- Derived
-
- Inherited Members
-
Constructors
ServiceBase(IEFCoreScopeProvider<CommerceDbContext>)
public ServiceBase(IEFCoreScopeProvider<CommerceDbContext> efCoreScopeProvider)
Parameters
efCoreScopeProvider
IEFCoreScopeProvider<CommerceDbContext>
Fields
_efCoreScopeProvider
protected readonly IEFCoreScopeProvider<CommerceDbContext> _efCoreScopeProvider
Field Value
- IEFCoreScopeProvider<CommerceDbContext>
Methods
Create(T)
public virtual Task<T> Create(T entity)
Parameters
entity
T
Returns
- Task<T>
Delete(Guid)
public virtual Task Delete(Guid id)
Parameters
id
Guid
Returns
- Task
Get(Guid)
public virtual Task<T> Get(Guid id)
Parameters
id
Guid
Returns
- Task<T>
GetPage(int)
public virtual Task<PaginatedResponse<T>> GetPage(int page)
Parameters
page
int
Returns
- Task<PaginatedResponse<T>>
List()
public virtual Task<IEnumerable<T>> List()
Returns
- Task<IEnumerable<T>>
StartQuery(CommerceDbContext)
protected IQueryable<T> StartQuery(CommerceDbContext db)
Parameters
db
CommerceDbContext
Returns
- IQueryable<T>
Update(T)
public virtual Task<IEnumerable<string>> Update(T entity)
Parameters
entity
T
Returns
- Task<IEnumerable<string>>