20 lines
569 B
C#
20 lines
569 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq.Expressions;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace SessionCompanion.Services.Base
|
|
{
|
|
public interface IServiceBase<TViewModel, TEntity> : IDisposable
|
|
{
|
|
IEnumerable<TViewModel> Get();
|
|
Task<TViewModel> Get(int id);
|
|
Task<IEnumerable<TEntity>> Get(Expression<Func<TEntity, bool>> expresssion);
|
|
Task Create(TViewModel viewModel);
|
|
Task Update(int id, TViewModel viewModel);
|
|
Task Delete(int id);
|
|
Task SaveAsync();
|
|
}
|
|
}
|