Tag | Entity Framework Posts

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, ...
I had fun presenting “What’s new in Entity Framework 4” at the Winnipeg Code Camp today. I mentioned some resources on my deck that I thought I’d include here in my blog. •EF 4.0 Hands on Labs •EF CTP 5 (has the new DbContext and CodeFirst support) •MSDN Data Developer Center: MSDN.com/Data •ADO.NET Team Blog •EF Design Blog •How to choose an inheritance strategy Programming Entity Framework, Second Edition by Julia Lerman ...
As some may have noticed, I have taken a liking to Ruby (and Rails in particular) quite a bit recently. This last weekend I spoke at the NYC Code Camp on a comparison of ASP.NET and Rails as well as an intro to Entity Framework talk. I am speaking at RubyNation in April and have submitted to other ruby conferences around the area and I am also doing a Rails and MongoDB talk at the Philly Code Camp in April. Before you start to think this is my "I'm leaving .NET post", which it isn't so I need to ...
Todays $10 deal from Apress at http://www.apress.com/info/... is "Entity Framework 4.0 Recipes: A Problem-Solution Approach" Whilst I am still wary of using the Entity framework and I would caution against its use for updates in financial systems, unless you use a technique such as you can find on pages 509-512 of this book. This book is very impressive as I found the answer to this in about 2 minutes from the time I downloaded the e-book. Entity Framework 4.0 Recipes: A Problem-Solution Approach ...
In my previous post, I introduced my problem, but I didn’t explain the problem with Entity Framework When you try the solution indicated you will take the following error: LINQ to Entities don’t recognize the method 'System.String Join(System.String, System.Collections.Generic.... of the method, and this method can’t be translated into a stored expression. The query that produces that error was: 1: var consulta = (from TCabecera cab in 2: contexto_local.TCabecera 3: let ...
In this Issue: Shawn Wildermuth, John Papa, Jesse Liberty(-2-), Mike Wolf, Matt Casto, Levente Mihály, Roy Dallal, Mark Monster, Andrea Boschin, and Oren Gal. Above the Fold: Silverlight: "Accept and Cancel Buttons Behavior in Silverlight" Matt Casto WP7: "Windows Phone 7 Runtime Debugging" Mike Wolf Shoutouts: Al Pascual announced a get-together if you're going to be in Phoenix on February 10 (next Thursday)... I just can't tell what time it is from the page: Phoenix Dev Meet-Up From SilverlightCream.com: ...
I’ve been updating the Winnipeg Code Camp website over the last few weeks with sessions and speakers as we’ve added them, and I’m happy to announce the full set of sessions!* We have a very interesting mix this year with new speakers and varied technologies! Remember this is a *FREE* event, so head over to our website to find out how to register for what will be a fantastic code camp! *OK, so we still have one session that needs to be have an official title, and one session that’s still TBA…but close ...
Many of my clients are actively using Silverlight 4 and RIA Services to build powerful line of business applications. Getting things set up correctly is critical to being to being able to take full advantage of the RIA services plumbing and when developers struggle with the setup they tend to shy away from the solution as a whole. I’m a big proponent of RIA services and wanted to take the opportunity to share some of my experiences in setting up these types of projects. In late 2010 I presented a ...

I have been working on a Refcard for DZone over the past months and it is finally published. The refcard gives you a intro into the basics of the Entity Framework 4 and can be used as a quick reference. 

Please take a moment to download it and check it out.  You can download it at: http://refcardz.dzone.com/refcardz/adonet-entity-framework

I’m trying to find time to update the Prairie Developer Conference 2011 website, and the sessions and speaker information will be up by this weekend including the registration page. For those that are wondering what the session and speaker list looks like, I wanted to give a sneak peak. We have a fantastic set of sessions by world class technologists! We’re covering .NET, Java, Ruby, SQL Server, Agile, User Experience, Mobile, Security, Azure, Office, SharePoint, and others. In fact, this year I’ve ...
In this Issue: Loek van den Ouweland, Andrea Boschin, Jeff Prosise, Jeff Brand, Frank LaVigne, WindowsPhoneGeek, Jesse Liberty, Jeremy Likness, and Haruhiro Isowa. Above the Fold: Silverlight: "Pop Up Behavior, now works with your Popup" Haruhiro Isowa WP7: "WP7 working with VisualStates: How to make a ToggleSwitch from CheckBox" WindowsPhoneGeek Entity Frameworks: "Six Free Entity Framework 4 Video Tutorials" Frank LaVigne Shoutouts: Jesse Liberty posted about 12 MORE Insanely Essential Utilities ...
In this Issue: Sigurd Snørteland, Yochay Kiriaty, WindowsPhoneGeek(-2-), Jesse Liberty(-2-), Kunal Chowdhury, Martin Krüger(-2-), Jonathan Cardy. Above the Fold: Silverlight: "Image Viewer using a GridSplitter control" Martin Krüger WP7: "Implementing WP7 ToggleImageControl from the ground up: Part1" WindowsPhoneGeek VS2010 Templates: "MVVM Project Templates for Visual Studio 2010" Jonathan Cardy From SilverlightCream.com: BabySmash7 - a WP7 children's game (source code included) Sigurd Snørteland ...
I just released an open source project at codeplex, which includes a set of T-4 templates to enable you to build logical layers (i.e. DAL/BLL) with just few clicks! The logical layers implemented here are based on Entity Framework 4.0, ASP.NET Web Form Data Bound control friendly and fully unit testable. In this open source project you will get Entity Framework 4.0 based T-4 templates for following types of logical layers: Data Access Layer: Entity Framework 4.0 provides excellent ORM data access ...

Today's E-Book bargain $10 from Apress at http://www.apress.com/info/dailydeal is Pro Entity Framework 4.0

Check out the Top Five most popular news at SilverlightShow for last week (20 - 26 Dec 2010). The most popular news for last week is Ryan Alford's solution on handling an error in Silverlight 4 when using Entity Framework 4, followed by Jeremy Likness' video on building an RSS Feed Reader in Silverlight. Here is SilverlightShow's weekly top 5: Silverlight 4 - Productivity Power Tools and EF4 A Silverlight MVVM Feed Reader from Scratch in 30 Minutes Resizable Grid Using Thumb Controls A Simplified ...
Today, I'm going to talk about a touchy subject: the notion of working in a company that doesn't use the prescribed "best practices" in its software development endeavours. Over the years I have, using a variety of pseudonyms, asked this question on popular programming forums. Although I always add in some minor variation of the story to avoid suspicion that it's the same person posting, the crux of the tale remains the same: A Programmer’s Tale A junior software developer has just started a new ...
There are several attributes available when using code first with the Entity Framework 4 CTP5 Code First option. When working with strings you can use [MaxLength(length)] to control the length and [Required] will work on all properties. But there are a few things missing. By default all string will be created using unicode so you will get nvarchar instead of varchar. You can change this using the fluent API or you can create an attribute to make the change. If you have a lot of properties, the attribute ...
I have been using EF4 CTP5 with code first and I really like the new code. One issue I was having however, was cascading deletes is on by default. This may come as a surprise as using Entity Framework with anything but code first, this is not the case. I ran into an exception with some one-to-many relationships I had: Introducing FOREIGN KEY constraint 'ProjectAuthorization_UserP... on table 'ProjectAuthorizations' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON ...
Thanks to everyone who attended my Entity Framework 4 presentation at CMAP last night. The code samples and PowerPoint can be downloaded here. The code samples include the Code First Optimistic Concurrency demo that I did not have time to show. More information can be found on that here ...

Next week (Tuesday, October 26) I’ll be presenting Entity Framework 4 at CapArea. The following week (Tuesday, November 2) I’ll be presenting the same talk at CMAP. Hope to see you there!

Entity Framework 4 Code First CTP4 was released in July and the API for developing without any edmx continues to mature and get better. Code First allows you to define your entity framework configuration with a Fluent API similar to Fluent NHibernate. Although the API for EF Code First is very user friendly, you should still have integration tests to verify that you’ve configured your entities correctly. This post will walk through configuring EF4 Code First optimistic concurrency. Suppose I have ...
Our West Palm Beach .Net User Group will be honored to have Scott Klein, Microsoft MVP and Author of Pro. SQL Azure (APRESS) as our October speaker. Scott will be talking and answering all our questions about Azure. Time has never been better for our Fladotnet West Palm Beach .Net User Group. We are fortunate to have a free meeting location offered to us by CompTec and to enjoy the backing and sponsorship of many top notch companies. This support is enabling us to uphold our founders’ vision: Create ...
With most of our systems pre-configured with SQL server, it was only today that I ran into this issue with my fresh installation instance of SQL Server 2008 R2. I had just created a new SandBox DB to experiment with some aspects of Entity Framework 4.0, but as I was saving foreign key changes to tables I had already created I got the following error: Figure 1 - Unable to save table schema changes error With some research, I found my answer in SQL Books Online: Any Schema changes made to a table would ...
This article will demonstrate how to add, edit, delete, group, sort, filtering data using ComponentWays Silverlight xamlDataGrid and RIA Services (DomainDataSource). Content Starting a New Project Exposing Data from Entity Framework Consuming Data in the Client with DomainDataSource and xamlDataGrid CRUD: Add, Edit, View, Delete data Validating Data Persisting Data and Error Handling Grouping Data Sorting Data Filtering Data Summary Starting a New Project Create a new Silverlight Application (C# ...
I returned just last night from a short trip to Redmond. While I was there, I learned some news that I wanted to share, but I wasn’t permitted to. But today the news was made public: Oslo, once destined to be a full fledged-wave of Microsoft technologies that would facilitate and promote model driven-development, is dead. The Oslo name summons Shakespearean images of King Hamlet slaying his Norwegian foe. But even without such literary context, the fall of Oslo is quite dramatic And it’s important ...
Model Functionality · Support for Enums for property types from lookup tables · Allow default date = DateTime.Now - The only way to set a default date in the entity data model is to put a hard date in there, a string. If you have a known default date (e.g. 1900-01-01) this is fine. But often we want NOW to be the default and there's no way to indicate that in the model. · Support for System.IO.Stream instead of Byte[] for varbinary type of fields · Support GUID as Entity Key -http://leedumond.com/blog/... ...
Entity Framework 4.0 (EF4) it the strategic .NET ORM from Microsoft. Hmm…. the “strategic” word. I will come back to that. However the important bit of news is we have Julie Lerman at Microsoft in London on the 22nd October devoting a full day to training on “Hard Core Entity Framework 4”. It’s a rare visit so if you’re interested in learning about the data stack from a recognised world-wide authority and author on the topic then register now (£300). Now back to that word “strategic”. As developers ...
So proud to say that I defeated the 70-516 Microsoft exam which covered data access with .NET 4.0! Obviously because of rules around taking Microsoft exams I can’t get into details about what I encountered, the things the questions focussed on, etc. But really I don’t have to since Microsoft is listing really good details on what’s covered and what percentage of the exam you can expect questions from the different areas. Experience obviously plays a role in determining how successful you’ll be, but ...
It’s James Avery’s birthday on Friday, and to celebrate he (and by extension Rob Conery) are opening up the TekPub content vault! Tomorrow (Friday), all content is free to view for a full 24 hours (barring server crashes, earthquakes, alien invasions, etc.)! You can read the official announcement on the TekPub blog here. Now maybe you’re not familiar with TekPub. It’s basically an online video store with tutorials created by experts in the technology field. These videos span everything from Entity ...
…make a LEMON GRENADE! I blogged a few days ago about this maddening issue with VS.NET 2010 and not being able to use the designer for ASP.NET 3.5 projects or add an EF model file to a .NET 4.0 project (You can read all the gory details here). Well my friends, I’m happy to report that I have a solution! Well, not a solution…but a workaround…kinda like how they dumped Megatron into the ocean at the end of Transformers instead of dismantling him: the threat is still there, just dormant. Unfortunately ...
In this Issue: Emiel Jongerius, Michael Washington, Kevin Dockx, Alex van Beek, and Alex Golesh. Sorry for being silent, but dealing with an imploding contract and training my replacement is sucking the energy out of me. Here is a Submittal only post... From SilverlightCream.com: Postponing actions Emiel Jongerius has a new post up on a utility class that can be used to limit the calls to internal synchronization methods of objects... think DeferRefresh. Dynamically Loading Silverlight Video Players ...
You’ve heard good things about Visual Studio 2010 but you still need to answer the question “What’s in it for me?” You need to justify the cost the new software as well as the not insignificant cost of migration. The Entity Framework is a powerful tool for creating a conceptual model of your data store and abstract away the details of data access. Exposing these conceptual entities over the wire to client applications mean one of two things: ADO.NET Data Services (now called WCF Data Services) or ...
On Tuesday August 18th, the first publicly available beta for the Microsoft Lightswitch development tool was posted on MSDN. For more information about this Silverlight application generator addition to Visual Studio 2010 visit: http://msdn.microsoft.com/e... Because it is still a beta I installed the 500mb ISO on a Windows 7 virtual pc VM which already had Visual Studio 2010. I had not spun up this VM for over 4 months so there were LOTS of updates to apply first. Although ...
One of my colleagues pointed me at Howard Baines as a recent example of a web consultancy already using Visual Studio 2010 and Entity Framework 4.0 to build web applications. I managed to grab a little time with co-founder Clive Howard (on twitter) to talk through some of the decisions, especially as I was intrigued to learn that they started out on Open Source Software including Ruby on Rails before switching to the .NET Framework. We discuss: Why switch to the .NET Framework? Entity Framework 4.0 ...
At VSLive today, I had the pleasure of introducing Microsoft Corporate VP Jason Zander. And he had the pleasure of introducing Visual Studio LightSwitch. Pleasure is a theme here, because the product, to me at least, looks great. LightSwitch is a .NET based environment, hosted in Visual Studio, that allows developers to build business apps. Quickly. It harkens back, with pride, to tools of old, like VB6 and FoxPro, that made data, and data maintenance UIs, first class citizens. These tools also treated ...
I’m prepping this week for the 70-515 exam I’m taking on Friday, and I thought I’d go through some VS.NET 2010 labs as part of my prep. One of them has to do with setting up a WCF service, where you create a web application and then add an Entity Framework model file to the project. Right click, Add New Item, Entity Framework file, and… Huh. Well that’s weird, considering that this is a .NET 4.0 web application project in Visual Studio.NET 2010…how can it not resolve to the target framework? So I ...
This week, Scott Guthrie, Corporate Vice President at Microsoft’s Developer Division, announced, via blog post, the early Beta release of a new tool called WebMatrix. WebMatrix is a free developer tool that enables Web development geared toward what might I might call Markup-and-Script developers (more on that in a minute). And although WebMatrix draws upon technologies already, or soon to be, present in the fuller ASP.NET Web development platform and the Visual Studio integrated development environment ...
In this Issue: Joseph Cooney, Matthias Shapiro, Ramani Sandeep, Andy Wigley(-2-), Chris Rouw, Michael Washington, Brian Noyes, Roger Peters, Sergey Barskiy, Timmy Kokke, and Phil Middlemiss. Shoutout: Koen Zwikstra announced Document Toolkit 2 Beta 2 available Rob Eisenberg announced Caliburn v1.1 Released! I missed this post by Andy Wigley of his material from TechEd: Programming Silverlight for Windows Embedded from .NET I hope you didn't miss the release of the Silverlight PivotViewer Control ...
I have moved this project from CodePlex to GitHub at https://github.com/danemorg... I have a posted a project on Codeplex at http://efrepository.codeple... It is a T4 template to give you a data layer that follows Repository and Unit of Work patterns that is also ready for Dependency Injection (DI). DI frameworks allow you to build code that is more testable and allows for a greater separation of concerns (SoC). This is not the only use for them, but it is a big one and what they are ...
I attended my first CodeStock this year and in short it was awesome. Like 100 billion hot dogs awesome. The travel there was crazy to say the least, but I met lots of new people, had a session go well and recorded 3 podcasts. So that is the short version. If you are on twitter and either follow me or followed the #codestock hash tag, you probably saw my airline craziness in Philly. It all started on Monday. We had a client deliverable on Wednesday morning and due to some things that happened I only ...
Some of the new Features in EF v4 are : context.ContextOptions.Lazy... is “true” by default. What this means is that if you access a Navigation Property (which returns either a EntityCollection or a EntityReference) of an Entity and if that Navigated Entity (or Entity collection) is not found in the ObjectContext then the ObjectContext automatically loads it when the NavigationProperty is accessed. This means additional round trip to the database for each Navigated entity. If you need ...
It seems like typed datasets provide the same type of object layout as the entity framework. What's the difference and why should I use one or the other? We'll start at the fundamental difference: DataSets give you a basic in-memory database that you can query and fill from a data source such as a database. Queries against datasets are executed against in-memory data. Entity Framework gives you a translation layer that translates LINQ queries to your database's SQL dialect. Queries against the EF ...
Note: I've translated this article from my Portugues blog: http://pontonetpt.com/blogs... I'm sorry for the bad english, but i'll try to translatet it better as possible with a little help of Google Translatter. I've writed this article because i coulnd't found one article about NHibernate 2.0 that was simple to understand in Portuguese. In the coming weeks I will spend some free time studying NHibernate. I've heard very good reviews ...
short answer: Quite probably, as SQL Azure is very similar to SQL Server longer answer: Object Relational Mappers (ORMs) that work with SQL Server are likely but not guaranteed to work with SQL Azure. The differences between the RDBMS versions are small – but may cause problems, for example in tools used to create the mapping between objects and tables or in generated SQL from the ORM which expects “certain things” :-) More specifically: ADO.NET Entity Framework / LINQ to Entities can be used with ...
I have enjoyed my time on this project and have used it in several production projects. However, with the enhancements in Visual Studio 2010 and the Entity Framework, the DSL tool doesn’t make sense for me to support at this time. With that said, I am looking for someone who has interest to continue the project if they so desire. I have moved my attention to creating a new project at Entity Framework Extensions for XAF. We are converting the current DSL tool into the Entity Framework extensions. ...
In this Issue: Ben Hodson, Fons Sonnemans, SilverLaw, Mike Snow, John Papa, René Schulte, Walt Ritscher, and David Anson. Shoutouts: René Schulte announced a whole batch of new features for WriteableBitmap that are now available: Filled To The Bursting Point - WriteableBitmapEx 0.9.5.0 Check out John Papa's Sticky Seesmic Desktop Plugin ... download it, play with it... he's going to blog about building plugins later Tim Heuer reported a Silverlight 4 minor update–June 2010 Erik Mork and Crew have ...
[Source: http://geekswithblogs.net/E... Recently I've been putting together a generic approach for paging the response from a WCF service. Paging changes the service signature, so it's not as simple as adding a behavior to an existing service in config, but the complexity of the paging is isolated in a generic base class. We're using the Entity Framework talking to SQL Server, so when we ask for a page using LINQ's .Take() method we get a nice efficient SQL query for just the rows we want, ...
The .NET Framework version 4 includes enhancements for ASP.NET 4 in targeted areas. Visual Studio 2010 and Microsoft Visual Web Developer Express also include enhancements and new features for improved Web development. This document provides an overview of many of the new features that are included in the upcoming release. This topic contains the following sections: ASP.NET Core Services ASP.NET Web Forms ASP.NET MVC Dynamic Data ASP.NET Chart Control Visual Web Developer Enhancements Web Application ...
If you are doing any work with Entity Framework and custom WCF services in EFv1, everything works great. As soon as you jump to EFv4, you may find yourself getting odd errors that you can’t seem to catch. The problem is almost always has something to do with the new lazy loading feature in Entity Framework 4. With Entity Framework 1, you didn’t have lazy loading so this problem didn’t surface. Assume I have a Person entity and an Address entity where there is a one-to-many relationship between Person ...