开发者

Can't get rid of querystring generated by EF parameters

开发者 https://www.devze.com 2023-03-28 16:38 出处:网络
I\'m new to MVC and EF and I am experimenting a bit with its functionaltiy. I have a problem with my URL. I have 3 entity classes generated from existing DB with the EF. Those properties get filled bu

I'm new to MVC and EF and I am experimenting a bit with its functionaltiy. I have a problem with my URL. I have 3 entity classes generated from existing DB with the EF. Those properties get filled but I keep seeing them in my URL even though I changed my routing.

routes.MapRoute(
                null,
                "Article{articleID}",
                new { controller = "Article", action = "Article" }
                );

My URL looks like this :

http://localhost:3629/Article2?User=System.Data.Entity.DynamicProxies.User_4AC672CE1F2946F8B58690EA73EF956F43E30746526AD255691FA5ABFC32BBFF&BlogComments=System.Collections........

So everything after the /Article2 should be removed, 开发者_Go百科can anyone tell me what's going on?


When you make your ActionLink, are you certain that you only send the ID as parameter, and not the entire Article instance?

0

精彩评论

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