12345678910111213141516171819202122232425262728293031 |
- using System;
- using System.Collections.Generic;
- using System.Data.Entity;
- using System.Data.Entity.Infrastructure;
- using System.Data.Entity.Validation;
- using System.Linq;
- using System.Threading;
- using System.Threading.Tasks;
- using System.Web;
- namespace Central.Control.WebApi.EFDbContext
- {
- public interface IDbContext
- {
- DbEntityEntry Entry(Object entity);
- IEnumerable<DbEntityValidationResult> GetValidationErrors();
- Int32 SaveChanges();
- Task<Int32> SaveChangesAsync();
- Task<Int32> SaveChangesAsync(CancellationToken cancellationToken);
- DbSet Set(Type entityType);
- DbSet<TEntity> Set<TEntity>() where TEntity : class;
- /// <summary>
- /// 删除
- /// </summary>
- /// <typeparam name="T"></typeparam>
- /// <param name="id"></param>
- void Delete<T>(string id) where T : class;
- }
- }
|