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 GetValidationErrors(); Int32 SaveChanges(); Task SaveChangesAsync(); Task SaveChangesAsync(CancellationToken cancellationToken); DbSet Set(Type entityType); DbSet Set() where TEntity : class; /// /// 删除 /// /// /// void Delete(string id) where T : class; } }