| 12345678910111213141516171819202122232425262728293031 |
- using System;
- using System.Collections.Generic;
- using System.Data.Entity;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using GreenTree.Nachtragsmanagement.Core;
- using GreenTree.Nachtragsmanagement.Data;
- namespace GreenTree.Nachtragsmanagement.Services.DbContext
- {
- interface IDbContextService
- {
- /// <summary>
- /// Checks if a DbSet exists in the curent DbContext
- /// </summary>
- /// <typeparam name="TEntity">The entity type of the DbSet.</typeparam>
- bool DbSetExists<TEntity>() where TEntity : BaseEntity;
- /// <summary>
- /// Get the DbSet of the corresponding Entity type
- /// </summary>
- /// <typeparam name="TEntity">The entity type of the DbSet.</typeparam>
- IDbSet<TEntity> GetDbSet<TEntity>() where TEntity : BaseEntity;
- /// <summary>
- /// Gets the current DbContext
- /// </summary>
- AppendixObjectContext GetDbContext();
- }
- }
|