添加项目文件。
This commit is contained in:
1 parent
6a017c9547
commit
58abbb5b4f
86 files changed
+8729
No files matched your search
@@ -0,0 +1,34 @@
|
||||
using FreeSql;
|
||||
using MAX.Core.DependencyInjection;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using StoreHub.Framework.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace StoreHub.Framework.Repositorys
|
||||
{
|
||||
public interface IUserRepository : IBaseRepository<User>
|
||||
{
|
||||
|
||||
}
|
||||
public class SqlRepository : WxRepository<User>, IUserRepository, IScopedDependency
|
||||
{
|
||||
public SqlRepository([FromKeyedServices("KJDDB")] IFreeSql fsql) : base(fsql)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
public abstract class WxRepository<TEntity> : BaseRepository<TEntity>
|
||||
where TEntity : class
|
||||
{
|
||||
protected WxRepository(IFreeSql fsql)
|
||||
: base(fsql)
|
||||
{
|
||||
fsql.CodeFirst.ConfigEntity<TEntity>(a =>
|
||||
{
|
||||
a.Name($"wxxd.{typeof(TEntity).Name}");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user