You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

32 lines
746 B

using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Threading.Tasks;
namespace Tiobon.Core.Domain;
public interface IBaseCRUDVM<TModel> where TModel : class
{
IEnumerable<TModel> Get();
TModel Get(Expression<Func<TModel, bool>> express = null);
TModel GetById(object id);
Task<TModel> GetByIdAsync(object id);
void DoAdd(TModel model);
Task DoAddAsync(TModel model);
void DoDelete(object id);
Task DoDeleteAsync(Guid id, Guid? updateById = null);
void DoRealDelete(object id);
Task DoRealDeleteAsync(object id);
void DoUpdate(TModel model);
Task DoUpdateAsync(TModel model);
Task<TModel> GetAsync(Expression<Func<TModel, bool>> express);
}