首页 新闻 搜索 专区 学院

autofac错误

0
悬赏园豆:10 [已关闭问题] 关闭于 2017-08-28 16:30

autofac的错误,是在找不出来哪里的问题,请教大神。。。

 

 

builder.RegisterType < MainBcUnitOfWork>()
.As<Booking.Beta.Implement.Interface.IUnitOfWork>()
.InstancePerLifetimeScope();

builder.RegisterType<Booking.Beta.Implement.DoctorAttachRepository>()
.As<Booking.Beta.Implement.Interface.IDoctorAttach>();

 

------------------------------------

public class DoctorAttachRepository:Repository<DoctorAttach>,IDoctorAttach
{
public DoctorAttachRepository(MainBcUnitOfWork context)
: base(context)
{
}
}

 

 

--------------------------

public class Repository<TEntity> : IRepository<TEntity> where TEntity : class
{
#region Members


public IUnitOfWork UnitOfWork { get; set; }

#endregion

#region Constructor

/// <summary>
/// Create a new instance of repository
/// </summary>
public Repository(IUnitOfWork unitOfWork)
{
if (unitOfWork == null) throw new ArgumentNullException("unitOfWork");

UnitOfWork = unitOfWork;


}

 

---------------------------

/// <summary>
///
/// </summary>
public class MainBcUnitOfWork:DBClinicBook,IUnitOfWork
{
public MainBcUnitOfWork()
{

}

一羽赐命的主页 一羽赐命 | 初学一级 | 园豆:11
提问于:2017-08-27 18:29
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册