24 lines
966 B
C#
24 lines
966 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using Mini.Model.Entity;
|
|
using MySql.Data.MySqlClient;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Text;
|
|
|
|
namespace Mini.Model
|
|
{
|
|
public interface IDbContext
|
|
{
|
|
DbSet<TEntity> Set<TEntity>() where TEntity : BaseEntity;
|
|
int SaveChanges();
|
|
IList<TEntity> ExecuteStoredProcedureList<TEntity>(string commandText, params object[] parameters) where TEntity : BaseEntity, new();
|
|
IEnumerable<TElement> SqlQuery<TElement>(string sql, params object[] parameters);
|
|
int ExecuteSqlCommand(string sql, bool doNotEnsureTransaction = false, int? timeout = null, params object[] parameters);
|
|
DataSet SqlQueryDataSet(string sql, CommandType commandType = CommandType.Text, params MySqlParameter[] parameters);
|
|
void Detach(object entity);
|
|
bool ProxyCreationEnabled { get; set; }
|
|
bool AutoDetectChangesEnabled { get; set; }
|
|
}
|
|
}
|