开发者

Configure EntityDataSource from a DAL?

I am learning Entity Framework 4.

I have a simple ASP.NET (Web Form) application. I created a separate project for my DAL. In the DAL, I have created开发者_如何学运维 an entity called Sites.

Now, I want to bind that to a form using an EntityDataSource control but it isn't visible. What am I doing wrong?

I made sure to reference the DAL.dll in the web project and include it in the code behind for the form. It's been a while since I've been in ASP.Net :-)

Thanks.


Possible reason: The class Sites in your DAL project is not public. You have only ...

class Sites
{
    ....
}

... which means that the class is internal (identical with internal class sites). Then you can reference this class only within the DAL assembly but not in another assembly. You need public class Sites.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜