开发者

Not possible to instantiate it as an implementation of DataModel

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜