src/EasyPermissionManagement.Core/Abstractions/IEasyPermissionContext.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EasyPermissionManagement.Core.Abstractions
{
/// <summary>
/// Abstraction of Easy Permission Db Context
/// </summary>
public interface IEasyPermissionContext
{
/// <summary>
/// Get Queryable Entity
/// </summary>
/// <typeparam name="T">
/// Type of Entity
/// </typeparam>
/// <returns>
/// Type of IQueryable
/// </returns>
IQueryable<T> Get<T>() where T : class;
/// <summary>
/// Insert Entity
/// </summary>
/// <typeparam name="T">
/// Type of Entity
/// </typeparam>
/// <param name="entity">
/// Entity
/// </param>
/// <returns>
/// Task
/// </returns>
Task<T> InsertAsync<T>(T entity) where T : class;
/// <summary>
/// Update Entity
/// </summary>
/// <typeparam name="T">
/// Type of Entity
/// </typeparam>
/// <param name="entity">
/// Entity
/// </param>
/// <returns>
/// Task
/// </returns>
Task<T> UpdateAsync<T>(T entity) where T : class;
/// <summary>
/// Delete
/// </summary>
/// <typeparam name="T">
/// Type of Entity
/// </typeparam>
/// <param name="entity">
/// Entity
/// </param>
/// <returns>
/// Task
/// </returns>
Task DeleteAsync<T>(T entity) where T : class;
/// <summary>
/// Insert Entity
/// </summary>
/// <typeparam name="T">
/// Type of Entity
/// </typeparam>
/// <param name="entity">
/// Entity
/// </param>
/// <returns>
/// Entity
/// </returns>
T Insert<T>(T entity) where T : class;
/// <summary>
/// Update Entity
/// </summary>
/// <typeparam name="T">
/// Type of Entity
/// </typeparam>
/// <param name="entity">
/// Entity
/// </param>
/// <returns>
/// Entity
/// </returns>
T Replace<T>(T entity) where T : class;
/// <summary>
/// Delete Entity
/// </summary>
/// <typeparam name="T">
/// Type of Entity
/// </typeparam>
/// <param name="entity">
/// Entity
/// </param>
void Delete<T>(T entity) where T : class;
}
}