开发者

linqdatasource: Databind from another project

开发者 https://www.devze.com 2022-12-14 20:44 出处:网络
I have a solution \"Foo\" with 2 projects. \"FooCore\" and \"FooWeb\" where FooCore peoject contains the FooDatacontext in namespace Foo.FooCore.Core.Domain . How can bind the dataco开发者_JAVA技巧nte

I have a solution "Foo" with 2 projects. "FooCore" and "FooWeb" where FooCore peoject contains the FooDatacontext in namespace Foo.FooCore.Core.Domain . How can bind the dataco开发者_JAVA技巧ntext with linqdatasource in FooWeb project in aspx page. Is this possible by doing "<% Import Namespace="Foo.FooCore.Core.Domain"%>" in that aspx page? I hope I able to explain my problem. Hope for a good simple solution.


Just make sure you project "FooWeb" have a reference to "FooCore" then add your linqdatasource and specify the ContextTypeName="Foo.FooCore.Core.Domain.FooDatacontext "

0

精彩评论

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

关注公众号