Я использую Net Core 2.2. Пожалуйста, помогите мне расширить в .net У меня есть
interface IBaseService<TDataContext, TEntity>
{
TEntity Insert(TEntity objectToInsert);
TEntity Update(TEntity objectToInsert);
}
Class BaseService<TDataContext, TEntity>:IBaseService<TDataContext, TEntity>
{
public TEntity Insert(TEntity objectToInsert) {
/*action Insert in BaseService */
}
public TEntity Update(TEntity objectToInsert) {
/*action Update in BaseService */
}
}
interface IUserService<TDataContext, TEntity>: IBaseService<TDataContext, TEntity>
{
TEntity SEARCH(TEntity objectToInsert);
}
Как расширить класс с помощью UserSerice, а IUserService не реализует Обновление, Вставка, только новый метод SEARCHIn Class
Class UserSerice<TDataContext, TEntity>:IUserService<TDataContext, TEntity>
{
public TEntity Search(TEntity objectToInsert){
/*SEARCH ACTION*/
}
//I want use action Insert / Update in BaseService
/*
public TEntity Insert(TEntity objectToInsert);
public TEntity Update(TEntity objectToInsert);
*/
}