http://code.google.com/p/sixthsense/source/browse/wiki/Hardware.wiki?r=19
Share on FacebookYearly Archives: 2011
Entity Framework 4.1 / 4.2 work arounds.
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=“DefaultConnection“connectionString=“Data Source=.;InitialCatalog=CodeFirst;Integrated Security=True;User Instance=True;MultipleActiveResultSets=True“providerName=“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=“WGEEntities“connectionString=“metadata=res://*/DataFirst.csdl|res://*/DataFirst.ssdl|res://*/DataFirst.msl;provider=System.Data.SqlClient;provider connection string="data source=.;initial catalog=WGE;integrated security=True;multipleactiveresultsets=True;App=EntityFramework"“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 : ObjectContextThis 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 FacebookMIcrosoft Joins the Sixth Sense race with Omnitouch.
http://blogs.wsj.com/ideas-market/2011/10/21/the-world-is-your-touchscreen/
Share on FacebookSixth 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
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
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 FacebookEvery new preview listing: ASP.NET
http://msdn.microsoft.com/en-us/aa570309
Share on FacebookRemix on August 6th..
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 FacebookFirst Peak at Windows Server 8 – internal Cloud!
http://digitalwpc.com/Videos/AllVideos/Permalink/3cb3788c-5c47-4b9e-987c-0dec4194058b/#fbid=N7KtExvIGZp
Share on Facebook