OL.FrameCore.Infrastructure/UnitOfWork/IUnitOfWork.cs

(完整代码) 681B

using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Text;

namespace OL.FrameCore.Infrastructure.UnitOfWork
{
    public interface IUnitOfWork
    {
        IRepositoryBase<TEntity> GetRepository<TEntity>() where TEntity : class;
        /// <summary>
        /// 直接提交到数据库
        /// </summary>
        void Save();
        IList<T> SqlQuery<T>(string sql, params object[] parameters) where T : new();
        int ExecuteSqlCommand(string sql, params object[] parameters);
    }

    public interface IUnitOfWork<TContext> : IUnitOfWork where TContext : DbContext
    {
        TContext DbContext { get; }
    }

}

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。