<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Part 3: Creating an Admin Controller</title><link>http://www.asp.net</link><pubDate>Wed, 22 May 2013 16:57:02 GMT</pubDate><generator>umbraco</generator><description>Comments for Part 3: Creating an Admin Controller</description><language>en</language><atom:link href="http://www.asp.net/rss/comments/42618" rel="self" type="application/rss+xml" /><item><title>Comment Posted by dohoaibien</title><link>http://www.asp.net/web-api/overview/creating-web-apis/using-web-api-with-entity-framework/using-web-api-with-entity-framework,-part-3</link><pubDate>Sun, 08 Jul 2012 08:16:29 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015939</guid><description><![CDATA[ <p>I can&#39;t create AdminController.cs. It error SQL  connect. Help me </p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/dohoaibien.jpg?forceidenticon=false&amp;dt=635050443000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by jasesaying</title><link>http://www.asp.net/web-api/overview/creating-web-apis/using-web-api-with-entity-framework/using-web-api-with-entity-framework,-part-3</link><pubDate>Thu, 12 Jul 2012 14:28:19 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015963</guid><description><![CDATA[ <p>Wouldn&#39;t the ApiController uri be /api/admin not /api/products?</p><p></p><p>Great tutorial btw, most of the older web api tutorials from a couple months back are now outdated and no longer work.</p><p></p><p>Cheers!</p><p></p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/jasesaying.jpg?forceidenticon=false&amp;dt=635050443000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by MikeWasson</title><link>http://www.asp.net/web-api/overview/creating-web-apis/using-web-api-with-entity-framework/using-web-api-with-entity-framework,-part-3</link><pubDate>Thu, 12 Jul 2012 16:22:12 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015966</guid><description><![CDATA[ <p>@jasesaying: Whups -- yes, thanks. I cut and pasted from another tutorial and forgot to update :-)</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/MikeWasson.jpg?forceidenticon=false&amp;dt=635050443000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by tala naji</title><link>http://www.asp.net/web-api/overview/creating-web-apis/using-web-api-with-entity-framework/using-web-api-with-entity-framework,-part-3</link><pubDate>Fri, 31 Aug 2012 19:42:00 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000016357</guid><description><![CDATA[ <p>thanx thanx thanx </p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/tala%20naji.jpg?forceidenticon=false&amp;dt=635050443000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by r.h.johnsen</title><link>http://www.asp.net/web-api/overview/creating-web-apis/using-web-api-with-entity-framework/using-web-api-with-entity-framework,-part-3</link><pubDate>Mon, 01 Oct 2012 08:29:13 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000016558</guid><description><![CDATA[ <p>{&quot;$id&quot;:&quot;1&quot;,&quot;Message&quot;:&quot;No HTTP resource was found that matches the request URI &#39;http://localhost:60736/api/Admin&#39;.&quot;,&quot;MessageDetail&quot;:&quot;No type was found that matches the controller named &#39;admin&#39;.&quot;}</p><p></p><p>No idea what I did wrong. Followed you along all the way, but still get this error message.</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/r.h.johnsen.jpg?forceidenticon=false&amp;dt=635050443000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by burchswm</title><link>http://www.asp.net/web-api/overview/creating-web-apis/using-web-api-with-entity-framework/using-web-api-with-entity-framework,-part-3</link><pubDate>Tue, 06 Nov 2012 19:30:32 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000016754</guid><description><![CDATA[ <p>Excellent series.  But, I couldn&#39;t get protected override void Seed(OrdersContext context) to fire...</p><p></p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/burchswm.jpg?forceidenticon=false&amp;dt=635050443000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by r01cn</title><link>http://www.asp.net/web-api/overview/creating-web-apis/using-web-api-with-entity-framework/using-web-api-with-entity-framework,-part-3</link><pubDate>Thu, 22 Nov 2012 22:21:34 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000016862</guid><description><![CDATA[ <p>No the code of AdminController.cs file?</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/r01cn.jpg?forceidenticon=false&amp;dt=635050443000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by garfieldzf</title><link>http://www.asp.net/web-api/overview/creating-web-apis/using-web-api-with-entity-framework/using-web-api-with-entity-framework,-part-3</link><pubDate>Mon, 26 Nov 2012 21:42:32 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000016881</guid><description><![CDATA[ <p>@dohoaibien paste your error info.</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/garfieldzf.jpg?forceidenticon=false&amp;dt=635050443000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by ronaldwh</title><link>http://www.asp.net/web-api/overview/creating-web-apis/using-web-api-with-entity-framework/using-web-api-with-entity-framework,-part-3</link><pubDate>Sat, 01 Dec 2012 22:35:46 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000016910</guid><description><![CDATA[ <p>I got a problem when creating the AdminController, I got this error message &#39;Unable to retrieve metadata for &#39;EntityFrameWork.Models.Product&#39;. Object reference not set to an instance of an object.&#39;</p><p></p><p>I already checked several forums and they say it is because my Product class doesn&#39;t have ID, but it does have the ID. Can you help me with this?</p><p></p><p>Thank you,</p><p>Best Regards,</p><p>Ronald Wisnu Hariyanto</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/ronaldwh.jpg?forceidenticon=false&amp;dt=635050443000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by ronaldwh</title><link>http://www.asp.net/web-api/overview/creating-web-apis/using-web-api-with-entity-framework/using-web-api-with-entity-framework,-part-3</link><pubDate>Sun, 02 Dec 2012 00:24:02 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000016912</guid><description><![CDATA[ <p>Sorry, I found the issue. I am using .NET 4.5 instead of 4.0</p><p>I changed to 4.0 and all work just fine.</p><p></p><p>Thanks,</p><p>Best Regards</p><p>RWH</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/ronaldwh.jpg?forceidenticon=false&amp;dt=635050443000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by victorwoo</title><link>http://www.asp.net/web-api/overview/creating-web-apis/using-web-api-with-entity-framework/using-web-api-with-entity-framework,-part-3</link><pubDate>Tue, 25 Dec 2012 02:41:21 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000017059</guid><description><![CDATA[ <p>My return is :</p><p>[{&quot;$id&quot;:&quot;1&quot;,&quot;Id&quot;:1,&quot;Name&quot;:&quot;Tomato Soup&quot;.......</p><p>Note that it&#39;s &quot;$Id&quot; but not &quot;Id&quot;. It seems this following line affect this:</p><p>json.SerializerSettings.PreserveReferencesHandling = PreserveReferencesHandling.Objects;</p><p></p><p>So is this article need to update?</p><p>According to your suggested article &quot;Handling Circular Object References.&quot;</p><p><a rel="nofollow" href="http://www.asp.net/web-api/overview/formats-and-model-binding/json-and-xml-serialization" target="_blank">www.asp.net/</a>#handling_circular_object_references</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/victorwoo.jpg?forceidenticon=false&amp;dt=635050443000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by fenix32</title><link>http://www.asp.net/web-api/overview/creating-web-apis/using-web-api-with-entity-framework/using-web-api-with-entity-framework,-part-3</link><pubDate>Tue, 16 Apr 2013 07:09:59 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000018911</guid><description><![CDATA[ <p>When Send a Request to the Controller, in the last step, it returns:</p><p></p><p>&lt;Error&gt;&lt;Message&gt;An error has occurred.&lt;/Message&gt;&lt;ExceptionMessage&gt;The &#39;ObjectContent`1&#39; type failed to serialize the response body for content type &#39;application/xml; charset=utf-8&#39;.&lt;/ExceptionMessage&gt;</p><p></p><p>How can I fix it? Thanks ^_^ (and congratulations for this excelent article)</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/fenix32.jpg?forceidenticon=false&amp;dt=635050443000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by fenix32</title><link>http://www.asp.net/web-api/overview/creating-web-apis/using-web-api-with-entity-framework/using-web-api-with-entity-framework,-part-3</link><pubDate>Wed, 17 Apr 2013 07:03:06 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000018920</guid><description><![CDATA[ <p>I would mean, the error only show when I use another connectionString, not the original.</p><p>By default, the project create 2 connectionString (2 db), but I want use onle 1.</p><p></p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/fenix32.jpg?forceidenticon=false&amp;dt=635050443000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by fenix32</title><link>http://www.asp.net/web-api/overview/creating-web-apis/using-web-api-with-entity-framework/using-web-api-with-entity-framework,-part-3</link><pubDate>Fri, 19 Apr 2013 05:54:43 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000018934</guid><description><![CDATA[ <p>My problem is that I want to use SQL-Server, not an static mdf file.</p><p>When I change the connection-string in the web.config, users can create the tables correctly. However, the rest of the application models (products, orders, OrderDetails) are not created.</p><p>For both use the same connection string:</p><p>&lt;add name=&quot;DefaultConnection&quot; connectionString=&quot;Data Source=SERVIDOR;Initial Catalog=pruebavisualstudio;Persist Security Info=True;User ID=usuario;Password=usuario&quot; providerName=&quot;System.Data.SqlCli</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/fenix32.jpg?forceidenticon=false&amp;dt=635050443000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by vitorreis</title><link>http://www.asp.net/web-api/overview/creating-web-apis/using-web-api-with-entity-framework/using-web-api-with-entity-framework,-part-3</link><pubDate>Wed, 22 May 2013 16:57:02 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000019159</guid><description><![CDATA[ <p>Hi guys, i get this error while i try to access api/admin</p><p></p><p>Someone can help me?</p><p></p><p>{&quot;$id&quot;:&quot;1&quot;,&quot;Message&quot;:&quot;An error has occurred.&quot;,&quot;ExceptionMessage&quot;:&quot;The &#39;ObjectContent`1&#39; type failed to serialize the response body for content type &#39;application/json; charset=utf-8&#39;.&quot;,&quot;ExceptionType&quot;:&quot;System.InvalidOperationException&quot;,&quot;StackTrace&quot;:null,&quot;InnerException&quot;:{&quot;$id&quot;:&quot;2&quot;,&quot;Message&quot;:&quot;An error has occurred.&quot;,&quot;ExceptionMessage&quot;:&quot;An error occurred while getting provider information from the database. This ca</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/vitorreis.jpg?forceidenticon=false&amp;dt=635050443000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item></channel></rss>