Sixth Sense Wiki – Hardware.. woohoo

http://code.google.com/p/sixthsense/source/browse/wiki/Hardware.wiki?r=19

Share on Facebook

Entity Framework 4.1 / 4.2 work arounds.

Keywords: Entity Framework not updating, Entity Framework not inserting,  Entity Framework not deleting.  When the default code doesn’t seem to do it for you there are a few work arounds you can try ot get connected with your DBContext or extended DBContext if using Code First.
* Make sure that you have the connection string in each app.config/web.config of every project you are using.
If you are using Code First, find your Context class and add a default contrustructor and one that takes a connection string like so: (From my OData / EF 4.2 /MVC 4 Demo)

public class OrderSystemContext : DbContext

{

//New Constructor Calling DBContext(connstring)

public OrderSystemContext(string connString) : base(connString){}

//Need to add a base constructor since you have a constructor with parameters.

public OrderSystemContext() : base(){}

publicDbSet<StateInfo> States { get; set; }

publicDbSet<Order> Orders { get; set; }

publicDbSet<Coupon> Coupons { get; set; }

publicDbSet<Promotion> Promotions { get; set; }

publicDbSet<Product> Products { get; set; }

publicDbSet<Customer> Customers { get; set; }

publicDbSet<Location> Locations { get; set; }

publicDbSet<ProductSet> ProductSets { get; set; }

}

Then you can directly call the connection string directly.

//This is calling the string by name, by default the “DefaultConnection” should work if places as a connection string name and you pass no parameters.  Though it did not in my case.

using (var db = new OrderSystemContext(“DefaultConnection”))

{}

<connectionStrings>

<add name=DefaultConnectionconnectionString=Data Source=.;InitialCatalog=CodeFirst;Integrated Security=True;User Instance=True;MultipleActiveResultSets=TrueproviderName=System.Data.SqlClient />

</connectionStrings>

If you are using Data First then you can just use the

using (var db = new MyEntities(System.Configuration.ConfigurationManager.ConnectionStrings[“MyEntities”].ConnectionString))

Connection String:

<add name=WGEEntitiesconnectionString=metadata=res://*/DataFirst.csdl|res://*/DataFirst.ssdl|res://*/DataFirst.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=.;initial catalog=WGE;integrated security=True;multipleactiveresultsets=True;App=EntityFramework&quot;providerName=System.Data.EntityClient />

Where you will use the class that is decorated in the .cs under the self tracking entities .TT file  and will be extended from DbContext or ObjectContext like so:

public partial class MyEntities : ObjectContext

This should force the connection.

 

I am unsure why I am having to do this work around, however it has helped others so I figured it was worth a post.

Share on Facebook

MIcrosoft Joins the Sixth Sense race with Omnitouch.

http://blogs.wsj.com/ideas-market/2011/10/21/the-world-is-your-touchscreen/

Share on Facebook

Sixth Sense to run on Windows OS.

So I’ve been checking out more and more TED videos and came across a the most wonderful innovation I have seen in a very long time called Sixth Sense. it is a device you can wear, it knows where your body is and fingers etc. You use yoru body as the controller rather than a mouse or a button and you can use any surface as a monitor.

This is my new after-hours coding home.
C#/C++ Code Base.
svn checkout http://sixthsense.googlecode.com/svn/trunk/ sixthsense-read-only

Share on Facebook

Speaking on ODATA, EF 4.1 Thursday at the Microsoft Building. – Mark Rowe

http://www.meetup.com/Microsoft-Integration-Architects/events/36096222/

We will cover EF 4.0, changes to 4.1., and the fix that resulted in 4.2

What problems are solved?
ObjectContext, DBContext.
Code First, DataFirst
Data Annotations (viewed through MVC4)
OData

Current Web Service Layers
WCFDataServices
Security
Queries
Customizing Post and Gets
Query Interceptors
Change Interceptors
ODataVisualizer

Share on Facebook

Azure Startup Tasks

Cloud 9 speech (Fast Forward to 16:00)

Create a Startup Task  in your .csdef

<WebRole name=”YourWebRoleName”>
     <Startup>
          <Task commandLine=”BatchOrCommandFile.Extension” executionContext=”elevated” taskType=”simple” />
          <Task commandLine=”BatchOrCommandFile2.Extension” executionContext=”elevated” taskType=”simple” />
          <Task commandLine=”BatchOrCommandFile3.Extension” executionContext=”elevated” taskType=”simple” />
     </Startup>
</WebRole>

commandLine = relative path to the local website.

Share on Facebook

Every new preview listing: ASP.NET

http://msdn.microsoft.com/en-us/aa570309

Share on Facebook

Remix on August 6th..

www.RemixSouth.com

Share on Facebook

Made the Magenic Thought Leadership page!

To be put up with the rest of these brilliant people is an honor and humbling.     http://magenic.com/AboutMagenic/ThoughtLeadership/VTSP.aspx

Share on Facebook

First Peak at Windows Server 8 – internal Cloud!

http://digitalwpc.com/Videos/AllVideos/Permalink/3cb3788c-5c47-4b9e-987c-0dec4194058b/#fbid=N7KtExvIGZp

Share on Facebook