开发者

Not possible to instantiate it as an implementation of DataModel

开发者 https://www.devze.com 2023-01-11 00:38 出处:网络
I just configured Castle-Windsor and am receiving this message: Type DataModel.IDepartmentRepository is abstract. As such, it is not possible to instansiate it as implementation of DataModel.IDepart

I just configured Castle-Windsor and am receiving this message:

Type DataModel.IDepartmentRepository is abstract. As such, it is not possible to instansiate it as implementation of DataModel.IDepartmentRepository service.

My Interface looks like this:

namespace DataModel  
{  
    public interface IDepartmentRepository  
    {  
        IQueryable<Department> GetAllDepartments();  
        Department GetDepartment(int id);  
        void Add(Department department);  
        void Delete(Department department);  
        void Save();  
    }  
}  

My Department class is set up 开发者_运维百科as a Partial Class to a class generated by LINQ TO SQL in my dbml file.

Any help would be very much appreciated.

Thanks -


I think the exception is pretty clear.

you need to tell Windsor what type you want to provide the implementation for your IDepartmentRepository

0

精彩评论

暂无评论...
验证码 换一张
取 消