Tag | Entity Framework Posts

During playing with Entity Framework I got the error: “Error while trying to run project: Unable to start program ‘'…’. The endpoint was not reachable. By running the project in Visual Studio. Outside VS were no problems. A similar project runs fine. So I compared both project files. Indeed the first project file contains the line: <Prefer32bit>false<... in some property groups. After deleting this line everything runs fine ...
With as often as I write code that does not perform as well as I would like for it to, I can’t believe how hard it is to write slow code on purpose! My last post gave a mile-high overview of the new version of Redgate’s ANTS Performance Profiler and promised more detail to come. True to my word (this time), this post aims to take a fairly simple application with common “opportunities” and use ANTS Performance Profiler to quantify these opportunities and measure the results. If you’re working along ...
I have seen a number of questions lately regarding how SQL Azure handles throttling and how to determine why the throttling occurred. Sometimes those questions are followed by another question asking how to handle throttling conditions in their applications. Troubleshooting SQL Azure Throttling GREAT NEWS! There actually is a way to find out if you are throttled and why, and the results of the throttling. The key is to look at the error message coming back to you. You’ll typically see an error message ...
Four or five years ago I was “introduced” to ComponentOne’s Winform controls while working on a fairly large, data-intensive application. I remember being very surprised at how easy their controls were to use compared to others I had worked with. Based upon my earlier experience with their products, I had pretty high expectations when I started evaluating Studio for Entity Framework. I’m happy to say that the product easily met my expectations and in some areas, moved the bar a bit higher. Before ...
What is the Streetlight Store?The Streetlight Store is a .Net library which uses the Entity Framework and a Microsoft SQL Server database to perform the "back-end" operations required for a typical e-commerce application. While the Streetlight Store is intended to be used for e-commerce, it is "front-end agnostic" meaning that you could just as easily create a point-of-sale user interface.Why is there a Streetlight Store?Why develop another e-commerce solution when there are so many already available? ...
Today's $10 Deal of the Day from APress at http://www.apress.com/97815... is Pro Entity Framework 4.0"Pro Entity Framework 4.0 is a professional-level guide to Microsoft's Entity Framework, the future of data access in .NET programming. Readers learn to implement easy-to-program and highly-performing database access solutions." ...
While I have always been a fan of libraries that improve coding efficiency and reduce code redundancy I have mostly been using ones that were in the public domain. As part of the Geeks With Blogs Influencers program a got my hands on ComponentOne’s Studio for Entity Framework. Below are my thought after working with the product for several weeks. My coding preference has always been maintainable code that is reusable across an enterprises protfolio. Because of this my focus in reviewing this product ...
This is the third of a three part series that deals with the issue of faking test data in the context of a legacy app that was built with Microsoft's Entity Framework (EF) on top of an MS SQL Server database – a scenario that can be found very often. Please read the first part for a description of the sample application, a discussion of some general aspects of unit testing in a database context, and of some more specific aspects of the here discussed EF/MSSQL combination. Lately, I wondered how you ...
This is the second of a three part series that deals with the issue of faking test data in the context of a legacy app that was built with Microsoft's Entity Framework (EF) on top of an MS SQL Server database – a scenario that can be found very often. Please read the first part for a description of the sample application, a discussion of some general aspects of unit testing in a database context, and of some more specific aspects of the here discussed EF/MSSQL combination. Lately, I wondered how ...
For good or bad, Microsoft’s Entity Framework (EF) has become one of the most widely used ORM tools out there. While some may state that it's not among the better ones (or that it's not even a real ORM), it’s definitely the most convenient one: its Visual Studio integration and consequently its integration with the MS SQL Server database is unparalleled. This is especially relevant to people who haven’t used the concept of object-relational mapping before - there's almost no initial learning curve ...
So you have started using DevExpress XPO/XAF and now you would like to see how to use the EDMX (Entity Data Model XML) visual designer within Visual Studio to draw your entities and relationships. First let’s explain the steps we are going to do and what is taking place, then I’ll give you the steps to accomplish this. The EDMX design surface is what is currently being used to generate Entity Framework code. What we have done is to intercept the saving of the diagram and use this to generate XPO/XAF ...
“Because everyone wants to kick their database, but sometimes kicking your database is a good thing!” Many would not argue that you should version your code, and few would argue against versioning your code in a way that can lead back to a specific point in source control history. However, most people don’t really think of doing the same thing with your database. That’s where RoundhousE (RH) comes in. I have been working on RH for over two years now and people always wander what it is, why and what ...

I will be presenting ‘The Role of Workflow in Enterprise Software’ at the Calgary .NET User Group on October 26th.  The presentation will cover workflow concepts, Windows Workflow Foundation 4 (WF4), and will also touch on Entity Framework Code First.

More details and registration at www.dotnetcalgary.com

See you all there!

Test Data Builder Pattern When unit testing we often need to fill any POCO objects with enough data to satisfy the needs of the test. Redoing this in every test can quickly become a burden and slow down the testing process. Test Data Builder is a pattern that’s meant to help in just that situation. With test data builder you build a fluent interface that allows you to build out your POCO objects by only replacing the properties that you need specific values for. The other values are set to defaults ...
At the beginning I want to inform that I've already read the similar question here: Entity Framework 4.0: is it worthy now? but it does not answer my questions and doubts concerning EF 4.0. Here's the case: We are working on a quite big project written in WPF and WCF. The structure of the database contains about 60 tables, lots of stored procedures, views and some functions. We are not using any ORM at the moment. Some time ago when the first version of EF was release we did not go with it because ...
I've been working lately on web application that uses Asp.Net MVC, WordPress and MySQL database. To communicate from .NET code to MySQL database using Entity Framework we installed MySql .NET Connector. It worked fine out of the box on developer's workstations but once deployed to hosted web server application started to throw following error: [NotSupportedException: Unable to determine the provider name for connection of type 'MySql.Data.MySqlClient.MyS... System.Data.Entity.ModelCon... ...
If you are a developer, you will encounter countless problems in your career. As a developer, problem solving is what you do. Still, some may try to shy away from problems in order to make their lives easier. I say do not, especially if you are a new developer or are learning a new technology. Learn to embrace problems as they come along. I am not simply referring to basic business problems, but issues that you encounter that cause weird problems that you must solve in order to continue. I’ll give ...
Recently I used Entity Framework 4.1 with Code First approach and step on a hidden rake. My application should create an SQL Server CE database file using supplied model classes. I created some model classes, one of the classes was declared as namespace MyProject.Models { public class Object { public int Id {get; set;} public String Name {get; set;} } } Then, I tried to declare property of DbSet<MyProject.Models.O... type in my class derived from DbContext: namespace MyProject.Models { public ...

Well simply put - flat out on a big Government IT project. This is due to go live next month and I'll be writing a number of pieces here on it.

Built on BizTalk, WCF, Windows Foundation, MVC, Entity framework and App Fabric....

Wijmo is an awesome tool from ComponentOne. The goal of this tool is to help us web developers rapidly develop MVC applications with interfaces richer than WebForms. Main Features: 1.Over 30 UI Widgets with everything from interactive menus to rich charts. 2.MVC scaffolding automation. This means that Wijmo generates rich interactive Views and Controllers for your entire Model. Free Trial DownLoad: http://www.componentone.com... In this review we'll take a look at Wijmo ...
No matter which ORM or data access technology you use, at some point you just need to do some CRUD, and you need to do it fast. In this post, I’m going to show you how to get your CRUD on with the latest version of Entity Framework in no time flat. In fact, I’d be surprised if the code to get your first CRUD operation done takes you more than a few minutes. The one thing the EF team did right with Code-First is make it really easy, but most of the “getting started” videos and documentation is packed ...
As of today, the official release of Lightswitch is now available. Visit: http://www.microsoft.com/vi... or you can download from your MSDN subscription. What is Lightswitch? It is basically a simple to use application generator that can be used to build applications within minutes in many cases. If you have an existing, well structured (primary keys, relationships) SQL Server database you are just a few clicks away from an administration tool and well on the way to a full ...
MvcScaffolding is a tremendous productivity improvement for MVC developers. Earlier this year, Steve Sanderson posted the definitive 7-part series on MvcScaffolding which is a must-read for anyone serious about doing scaffolding. The best part about the scaffolding infrastructure is that MvcScaffolding is actually built on top of another package called T4Scaffolding. T4Scaffolding can be used as the basis for *any* scaffolding – not just MVC projects. To that end, we can enjoy the same power of MvcScaffolding ...
After reading DLinq (Linq to SQL) Performance and in particular Part 4 I had a few questions. If CompiledQuery.Compile gives so much benefits, why not to do it for all Linq To Sql queries? Is any essential disadvantages of compiling all select queries? What are conditions, when compiling makes whose performance, for how much percentage? World be good to have default on application config level or on DBML level to specify are all select queries to be compiled? And the same questions about Entity Framework ...
The Membership API came in .NET 2.0 and was a huge enhancement in building web applications with users, managing roles, permissions etc., The Membership API by default uses SQL Express and until Visual Studio 2008, it was available only through the ASP.NET Configuration manager screen (Website – ASP.NET Configuration) or (Project – ASP.NET Configuration) and for every application, one has to manually visit this place to start using the Security and other settings. Upon doing that the default SQL ...
The chances are pretty high that you are creating a multi-tiered application with a solution that may be calling several different projects, one of which is the ADO.NET Entity Framework DAO-layer. In order for the entity frame work to work outside the immediate project that its been created under, you'll have to import the connection string built by the EF wizard at create time to your other project's application or web config file. Here's an example. I have two projects under a single solution, ...
I hit this error when I deployed an app built with Entity Framework onto Windows Azure. Obviously, I wasn’t explicitly using DataReader so it kind of puzzled me. As it happens every time It worked well with local database, application running local and database on SQL Azure. But once I used the Dev Fabric to test the application locally, it failed and gave the above error. Entity Framework relies on using Multiple Active Results Sets (MARS), and it would be a part of connection string multipleactiveresultsets=True. ...
In this article I'm going to demonstrate how to create a simple sign-up form using ASP.NET MVC 3. So basically in this demo you will learn the following: How to insert data to the database with Entity Framework How to validate the Form using Data Annotations How to Authenticate users after sign up using FormsAuthentication Note that before you continue reading this article be sure that you have the basic understanding about ASP.NET MVC in general. You can refer the following links below to learn ...
Check out the Top Five most popular news at SilverlightShow for SilverlightShow Top 5 News for May 23-29, 2011. Here are the top 5 news on SilverlightShow for last week: Entity Framework 4.1 Code First, Silverlight, and Shared Models with REST+JSON A Simple Physics Game using Silverlight and Farseer Engine Windows Phone 7 Mango - Sockets Using IIS Express to Secure Silverlight and WCF Applications Windows Phone 7 Mango - Silverlight and XNA integration Visit and bookmark SilverlightShow. Stay in ...
PREREQUISITES DEVELOPPMENT TOOL In this tutorial, component that follow is required and need to be install: Visual Studio 2010 Express ADO.NET Entity Framework 3.5/4.0 Microsoft Silverlight 4 Tools for visual Studio 2010 that include all components necessary for silverlight 4: Silverlight 4 developper runtime, silverlight 4 SDK, silverlight 4 tools for visual studion 2010. Please, to download it, please refer to this link. INTRODUCTION This topic explain in the simple way how to display data from ...
Looks like bloggers figured out I'd post the submittals first, because today I got hammered with posts. In this 2nd in a row Submittal-only Issue: Alex Golesh(-2-, -3-, -4-, -5-), René Schulte, Alex van Beek, Kunal Chowdhury(-2-), Rudi Grobler. Above the Fold: Silverlight: "Silverlight 5 Multiple Window Support" Kunal Chowdhury WP7: "Augmented Mango - SLARToolkit for Windows Phone" René Schulte WP7: "Windows Phone Mango–What’s New? (“New Sensors & Tooling Enhancements” - Part 3 of 8)" Alex Golesh ...
In this Issue: Chris Rouw, Kevin Dockx(-2-), WindowsPhoneGeek, Jesse Liberty, Jeremy Likness, Telerik Phone Team, Mike Taulty(-2-), Pete Brown, and András Velvárt. Above the Fold: Silverlight: "Locking and Unlocking controls in a Silverlight LOB Application" Chris Rouw WP7: "WP7 ToDo Lists App Built with RadControls" Telerik Phone Team Just too cool not to list: "Kinect + Bing Maps–the gestures" András Velvárt Shoutouts: The SilverlightShow folks sent me their top 5 from last week: SilverlightShow ...
Let’s focus on Exam 70-516 this time. This exam is TS: Accessing Data with Microsoft .NET Framework 4. Additional Resources: http://msdn.microsoft.com/e... The exam objectives are: Modeling Data Map entities and relationships by using the Entity Data Model http://msdn.microsoft.com/e... http://msdn.microsoft.com/e... http://msdn.microsoft.com/e... Map entities and relationships by using LINQ to SQL http://msdn.microsoft.com/e... ...
Todays $10 deal of the day from Apress at http://www.apress.com/97815... is: Pro Entity Framework 4.0 is a professional-level guide to Microsoft's Entity Framework, the future of data access in .NET programming. Readers learn to implement easy-to-program and highly-performing database access solutions ...
Ajax enabled data centric applications are getting popular day by day in web development space. While these type of web applications provide rich user experience, building a robust and powerful application quickly is a great challenge for developers. Fortunately Microsoft has started providing great frameworks, plug-ins and APIs to facilitate this process. Last week Microsoft announced a new version of java-script API “datajs”, which is intended to help web developers to build data centric AJAX applications ...
Here’s a quick start introduction to the ADO.NET Entity Framework Code First Development Pattern. For a more complete (but still intro) walkthrough, check out ScottGu’s blog. At the time of this writing, you’ll need the EF 4.1 Release Candidate. After EF 4.1 is released you’ll no doubt be able to find it on the ADO.NET team blog. 1. Create a new empty ASP.NET MVC2 Web Application, add a reference to System.Data.Entity. If using the EF4.1 RC - add a reference to the EntityFramework dll that comes ...
Yesterday I did my first grok talk - it was on Unity Interception at Dot Net Dev Net in Bristol, UK. It went ok! The feedback was that the content was very good but the presentation could have been a bit better, which is very possibly the story of my programming life :) For posterity, I've put the content on BitBucket. There's a Powerpoint slide show with notes (more or less what I said as I went through it) and 4 demo C# projects - one each for Interface Interception, Transparent Proxy Interception ...
ADO.NET Entity Framework 4.1 is now released... You can download the installer HERE or Install NUGET and get the package HERE NUGET- is a Visual Studio extension that makes it easy to install and update open source libraries and tools in Visual Studio ...
Fellow Techies of the world.. Welcome! In this obligatory first post I want to just tell you a little about myself and what I intend to do with this blog. I’ve worked in fits and starts on a tech blog before so I’m happy to be a part of the GeeksWithBlogs community now and make it my new home. Let’s begin at the beginning… Sometime back in 1995 my dad (who has worked with computer pretty much since there have been computers) brought home 2 books. Visual Basic 4 and Visual C++ 4 (For Beginners). I ...
Previously we've talked about how to fetch the data from the database and populate the form with EF. In this example I'm going to demonstrate how to do Edit,Update and Delete operations in the form with Entity Framework. And oh since this is a continuation of my previous example I would suggest you to refer that first before you go any further. STEP 1: Setting up the UI Since this is a continuation of my previous example then I'm jus going to use the same layout and extend it a bit by adding some ...
In Part 1 we've talked about how to insert data to the database with Entity Framework. In this part I'm going to demonstrate how to fetch the data from the database and populate the form fields with Entity Framework. STEP 1: Setting up the Form To get started let's go ahead and fire-up visual studio and add a new WebForm. For the simplicity of this demo I just set up the form like this: <asp:Content ID="Content2" ContentPlaceHolderID="MainC... runat="server"> <asp:DropDownList ID="ddlUser" ...
Few months ago I wrote a series of articles regarding how to Insert, Update, Fetch and Delete data in the form using LINQ to SQL. You can view the series of articles below: Inserting Data to Database using LINQ to SQL Fetching Data from Database and Populating fields in the Form using LINQ to SQL Editing, Updating and Deleting Data in the Form using LINQ to SQL In this article I'm going to demonstrate the basics on how to work with MS Entity Framework. Basically in this part I'm going to show you ...
I have a .Net 4.0 site that uses Entity Framework and Linq to SQL. After reworking a few tables and a few page operations, a new error appeared: "Row not found or changed". Every time I commit changes to a particular table, this error would be raised. From a quick review of msdn and the internet, the primary reason for this exception appears to be data concurrency issues - (The source data in the database is out of sync with the data you are attempting to update.) That did not apply to my development ...
I dont know about you, but last year I suffered from MVVM overdose. I literally felt sick having to go through the rote task of building the same old Prism modules and building the same old ViewModel to abstract my Model, setup my bindings in my view .... again and again and again and again .... ad nausium. Now that I've had a break from client side information system dev, I can think about it from a different perspective. I've leveraged and investigated the following technologies. 1) Cinch from ...
This article is Part 2 of the series “Producing and Consuming OData in a Silverlight and Windows Phone 7 application.” Producing and Consuming OData in a Silverlight and Windows Phone 7 application. (Part 1) – Creating our first OData Data Source and querying data through the web browser and LinqPad. Producing and Consuming OData in a Silverlight and Windows Phone 7 application. (Part 2 ) – Consuming OData in a Silverlight Application. Producing and Consuming OData in a Silverlight and Windows Phone ...
Employee Info Starter Kit is an open source ASP.NET project template that is intended to address different types of real world challenges faced by web application developers when performing common CRUD operations. Using a single database table ‘Employee’, it illustrates how to utilize Microsoft ASP.NET 4.0, Entity Framework 4.0 and Visual Studio 2010 effectively in that context. Employee Info Starter Kit is highly influenced by the concept ‘Pareto Principle’ or 80-20 rule. where it is targeted to ...
Employee Info Starter Kit is an open source project that is highly influenced by the concept ‘Pareto Principle’ or 80-20 rule, where it is targeted to enable a web developer to gain 80% productivity with 20% of effort with respect to learning curve and production. It is intended to address different types of real world challenges faced by web application developers when performing common CRUD operations. Using a single database table ‘Employee’, the current release illustrates how to utilize Microsoft ...
Ever wanted to have a simple jQuery menu bound with ASP.NET web site map file? Ever wanted to have cool css design stuffs implemented on your ASP.NET data bound controls? Ever wanted to let Visual Studio generate logical layers for you, which can be easily tested, customized and bound with ASP.NET data controls? If your answers with respect to above questions are ‘yes’, then you will probably happy to try out latest release (v5.0) of Employee Starter Kit, which is intended to address different types ...
Prologue Following with the Serie I started yesterday about Entity Framework with Oracle, Today I am going to start talking about Entities. What is an Entity? A Entity is an object of the EF model corresponding to a record in a DB table. For example, let’s see, in Image 1 we can see one Entity from our model, and in the second one we can see the mapping done with the DB. (Image 1) (Image 2) More in depth a Entity is a Class inherited from the abstract class “EntityObject”, contained by the “System.Data.Objects.DataCl... ...
Prologue I have a busy personal and working time, and at this moment that I start to get more free time, I decided to start a Serie about Entity Framework with Oracle. A few time ago, I got my first experience with EF and Oracle with Oracle 10 g express and Oracle 10 g with the same results, Doesn’t work. Now I download Oracle 11 g to Test again. Tools To start using EF with Oracle we need the following: 1. Visual Studio 2010. No Express Edition 2. Oracle 11g 3 Oracle Driver for EF (ODAC) Intro People, ...