Although I did see early versions, I just happened to notice that the O’Reilly Media page for the new book (Programming Entity Framework Code First) now has the book cover image on it.
All posts by Julie
Code First and DbContext are now “The Entity Framework”
In the recent blog post, How We Talk about EF and its Future Versions, the EF team announced that going forward, the stuff of EF that’s in .NET, will be referred to as the EF Core Libraries. For example, .NET 4 contains EF 4…that’s now core libraries. When .NET 4.5 is released, whatever is contained within System.Data.Entity.dll will be EF 4.5 Core Libraries.
As you may know by now, Code First and DbContext were released out of band of the .NET release schedule and is contained in the EntityFramework.dll assembly which is distributed via Nuget. Code First and DbContext rely on the core libraries to do their job. In the blog post, the team says “we are going to focus on the EntityFramework NuGet package as the primary deliverable that we refer to as “The Entity Framework” or “EF”.
This allows the team to be more flexible in releasing new features that leverage all of the work that’s gone into Entity Framework – features such as Code First and the DbContext API.
(For anyone writing or blogging etc about EF, please keep these differences in mind and be attentive to how you express EF.)
However, there’s something more important that I took away from the team’s blog post based on the fact that what’s in the NuGet package (DbContext and Code First) is what the team now refers to as “Entity Framework”.
What this means to me is that DbContext and Code First are the first features you should consider when approaching Entity Framework.
This makes a lot of sense to me. DbContext is much simpler to use than ObjectContext and will serve the most common development needs. if you need more, you can drop down into the ObjectContext. Remember that DbContext sits on top of the ObjectContext. The ObjectContext is always there in the background doing it’s work. So if you need to do something very granular, DbContext provides a hook to its underlying ObjectContext. Check out this blog post for how to do that: Accessing ObjectContext Features from EF 4.1 DbContext. Or, if you are already committed to working directly with the ObjectContext, you can still do that.
What about database first and model first? The designer is still inside of Visual Studio (and getting improvements) and there are 3rd party designers as well. If Code First doesn’t do the trick for you, you really want a visual model — or you’re already committed to EDMX — no worries. The feature is still there and you will not be a pariah for using the designer. Use the best tool for the job … for *your* job! (Here’s an article I wrote about choosing between db/model & code first)
The core EF Libraries know how to use the XML based metadata that come from the EDMX. At runtime, EF uses an in-memory representation of your model. If your model is expressed in XML (from the designer), the ObjectContext knows how to read the XML to create what it needs at runtime. (Even if you’re using DbContext + EDMX, this works…because DbContext has an ObjectContext behind it). If your model is expressed in classes plus Code First configurations, the context knows how to use those pieces to build the in-memory metadata at runtime. After that, EF doesn’t care where the model came from.
So the primary focus of Entity Framework going forward will be building models with your classes plus Code First and managing your entities with the DbContext. When the team talks about Entity Framework, (according to their blog post) that’s most likely what they’ll be referring to.
There’s ANOTHER take away here. Code First leverages the POCO support that was built into the core in .NET 4. (see what I just did there?
) EntityObject is now the ugly step-child of Entity Framework. After working mostly with POCOs in EF for over a year now, I feel the same way about EntityObject. No love lost there!
When the team makes changes to how the core EF libraries (those which are part of .NET), again …popular examples are upcoming enum support and spatial data support … they’ll be clear that this is part of the core. Changes to the core benefit all of the ways to use EF …whether you build your model with a designer or with code and whether you use the ObjectContext or DbContext.
I’ve just finished up a book with Rowan Miller that is something of an extension to my book, Programming Entity Framework Second Edition (which is focused on Entity Framework 4). The new book is about 150 pages and is called “Programming Entity Framework Code First: Creating and Configuring Data Models from your Classes”. Very specifically about the modeling/mapping and DB initialization. We are now embarking on another short book that will be Programming Entity Framework DbContext. This second one will be focused on the DbContext APIs, validation and how to use them in various application patterns.
Vermont IT Jobs: Senior Embedded Software Engineer at NRG in Hinesburg
(note there is also a Software Engineer job available)
Senior Embedded Software Engineer
Job Description
August 2011
Key Focus
This experienced Embedded Software Engineer will develop electronics instrumentation for the collection and transmission of meteorological data. This role will include writing embedded firmware for a variety of electronic system design projects involving the evolution and development of microprocessor-based electronics systems. The scope of responsibility will include concept development, requirements definition and validation, analysis and detailed design, implementation, verification, and optimization in a lean environment.
This is a full-time position in the engineering department and reports to the Engineering Manager, Instruments. This position will work in partnership with the engineering team to achieve goals of the department that are in line with the company strategic plan, and will embrace the high standards of NRG ethics and core values.
Primary Responsibilities
· Write and test embedded firmware for microcontrollers in C language
· Work with Electrical Engineers to debug printed circuit board assemblies
· Work with Software Engineers to develop interfaces and protocols
· Work with stakeholders to develop product requirements and system designs
· Review the code of other engineers
· Help develop and continuously improve software development processes and tools
· Plan and manage feature requests and bug fixes after initial product release
· Product idea innovation
· System architecture design and system specification generation
· Design of experiments, qualification testing, data collection and analysis
· Hands-on prototyping and field testing
· Supplier and customer interface
· Measurement science
Qualifications
· Bachelor’s degree in engineering or computer science
· 5 – 10 years experience in product design
· 5 years minimum experience in embedded programming
Technical Skills Required
· Proficient developing in C for embedded microcontrollers
· Strong knowledge of mature software development best practices for the full software lifecycle including design, coding, testing, and supporting after release
· Experience working on complex software systems in a team environment
· Excellent written and oral communication skills
· Proficient reading electrical schematics, and basic understanding of analog and digital circuits
· Embedded system test plan development and execution
· Able to quickly and accurately estimate time to complete tasks for a project
Technical Skills Preferred
· Experience in circuit design, analysis and test
· Experience with a variety of communications hardware and protocols
· Experience with electromechanical systems and systems integration
· Experience in systems specification and analysis
Personal Skills Required
· Ability to work effectively in teams
· Strong attention to detail
· Ability to multi-task and meet deadlines
· Independence and self-direction
· Excited to learn
How do I apply?
Download an application (or stop by to pick one up) and mail it along with a cover letter and resume to:
ATTN: Human Resources
NRG Systems
110 Riggs Rd.
Hinesburg, Vermont 05461
You may also email your resume and materials to recruit@nrgsystems.com.
Vermont IT Jobs: Sr. Software Engineer, C# & more, Stowe
EverBank is currently recruiting for a Sr. Software Engineer for our Stowe office. This position is responsible for designing, programming, evaluating, recommending, planning, coordinating and maintaining software applications and solutions related to Web and Marketing technologies to improve and automate business processes thereby creating strategic advantage for EverBank. Seeking candidates with experience in C# 2-4, ASP.NET, XML, WCF, Web Services, JSON, (X)HTML, HTML5 – CSS3, JavaScript, JQuery, and AJAX. Please apply online at: https://www.abouteverbank.com/careers/opportunities-Apply.aspx?jobid=2589103.
Sessions for Vermont Code Camp III
The 24 Talks of Vermont Code Camp
Saturday Sept. 10th, Burlington Vermont
Once again, we have a fabulous array of talks with many technologies covered. We’ll be building the actual schedule in the next week.
In alphabetical order……….
Chris Bowen HTML5 – A Practical First Look
Rene Churchill A Holistic view of Website Performance
Christian Cote SSIS Whats new in SQL Server Denali?
Rob Friesel CSS Wrangling with SASS
John Garland What’s New in Windows Phone 7.1 Silverlight Development
Vincent Grondin Mocking and mocking frameworks
David Howell Tackling Big Data with Hadoop
Everett McKay Effective Prototyping: A developer’s guide to better design through prototyping
Dane Morgridge Testable Entity Framework
Dane Morgridge jQuery & CoffeeScript: Let The Awesomeness Begin
Jim O’Neil Sampling from the Cloud Computing Smorgasbord
Dennis Perlot Silverlight Performance
Jonathan Phillips Functional Programming on the JVM
Al Ramirez What’s New In ASP.NET MVC3
Maxime Rouiller ASP.NET MVC 3 for Web Developers
Josh Sled Dependency Injection
Josh Sled Emacs: Everday, Everyway
Eric Smith What is functional programming?
Kevin Thorley FOSS in the Enterprise
Etienne Tremblay Let’s talk Virtualization
Matt Van Horn Getting High on MEF
Bill Wilder Applying Architecture Patterns for Scalability and Reliability to the Windows Azure Cloud Platform
Joan Wortman & Maura Wilder Introduction to the Ext JS JavaScript framework "for Rich Apps in Every Browser"
John Zablocki .NET and NoSQL: Relaxing with CouchDB
Bonus Parlor Chat Session:
Matt Van Horn : Software Consulting
More info vtcodecamp.org
Register vtcodecamp.eventbrite.org
Teaching a 5-day Workshop (Entity Framework Boot Camp) Oct 3-7 in Boston
I’m excited about embarking on my first full-week workshop. Until now, I have done a number of one-day workshops but I have always felt that I needed more time. There’s so much to share! Maybe five days will be enough?
The workshop will be in Boston (Waltham, to be exact) the first week of October. It is being coordinated by www.dataeducation.com.
Below is the course outline.
There is currently a $400 early bird discount until the end of August.
Details and registration at http://dataeducation.com/entity-framework-bootcamp/
Day 1: Introducing Code First
- Why Code First?
- How does Code First work at runtime?
- Configuring Code First with Data Annotations and with the Fluent API
- Configuring for validation, data attributes, relationships, database mappings and hierarchies
- Understand impact on database
- Understand impact on your application at runtime
- Code First database initialization
- Understand default and optional behavior and workarounds
Day 2: Introducing EF 4.1 DbContext /DbSet
- How do DbContext and DbSet compare to ObjectContext/Object Set
- Explore features of DbContext/DbSet that streamline EF coding
- Integrate DbContext with your apps
- Validation API
- Fun with MVC 3 and EF 4.1
Days 3-5: Hard Core EF 4 (and 4.1)
- Architecting maintainable and testable enterprise apps with EF4/4.1
- Repositories, unit of work, testing
- EF in distributed architectures: ASP.NET, WCF Services, WCF Data Services
- EF in the Cloud: Windows Azure and SQL Azure
- EF performance tips and tricks
- Working with large models and multiple contexts
- Explore EF core API additions and improvements introduced in the June 2011 CTP
- Enum support, spatial, TPT improvements, designer improvements and more
You Win! An EF 4.1 Update to Programming Entity Framework is In the Works!
After I finished writing the first edition of Programming Entity Framework, 832 pages long, I announced to anyone within earshot that if I every talked about writing another book to just shoot me.
After I finished writing the second edition of Programming Entity Framework, which came in at nearly 900 pages, I said “I really mean it this time"!
And then Entity Framework 4.1 was released with Code First modeling and the sweetness of the DbContext and other additions to this API.
Many asked me if I would update the book. I said “no” a thousand times and explained in this blog post, EF4 books and EF 4.1, why revising the entire book for what amounts to two small additions that don’t impact the core behavior of Entity Framework made no sense.
But you still asked.
I wrote articles and created videos.
But you still asked for a new book.
And then in a moment of insanity (I believe it was during 5 long hours of driving alone in the car to my parents’ house), I decided that maybe I could just write a short book that would essentially “tack-on” to Programming Entity Framework Second Edition.
And so it goes…this is what I am now working on. But I got smart this time! This spring, I worked on a series of content for MSDN with Rowan Miller from Microsoft. Rowan is a Program Manager on the ADO.NET Entity Framework team and has been instrumental in EF 4.1. He knows it better than most anybody. Certainly better than I do! And he’s a good writer. He’s a bit less verbose than I am (you can wrap that in exaggeration) but I’ve been working on him.
I liked working on that project with Rowan and it did not take a lot of convincing to get Rowan to agree to do a book with me. I’m very lucky to have him as a partner-in-crime for so many reasons!
Rowan and I are collaborating on all aspects of this project. We are both writing, but we are working very closely together so that it is not disjointed. We’ll have a common writing style and there will be a storyline and buildup of code from beginning to end. We are helping each other with decisions about samples and how information should flow.
The Game Plan
We are writing two “mini-books” for O’Reilly Media. We are writing them as though they are a continuation of Programming Entity Framework. I expect that we’ll have the same Seychelles Blue Pigeon on the cover (or some twist on that). We’ll work with the same business domain , Breakaway Geek Adventures, and there will be references to the previous book (2nd edition). There’s just no reason to repeat explanations of API stuff that is the same.
The pattern for these books follows other recent offerings from O’Reilly. They will be short-ish (targetting 100 pages each) and presented as e-books (with print on demand availability). The first book will focus on Code First – more specifically, on building a model, database initialization etc. The second book will start where the first book ends focusing on the other half of EF 4.1, DbContext, DbSet etc. In this book we’ll be able to write real code with the combination of DbContext (etc) and Code First. This is where we’ll create some sample apps, repository, do some testing etc. We are already about 1/2 way through writing the Code First book and hope these will be out in mid-fall.
If you take a look at the CouchDB books that Bradley Holt ( a friend and neighbor and one of the Vermont Code Camp organizers – just coincidentally
) has written — Writing and Querying MapReduce Views in CouchDB, First Edition and Scaling CouchDB, First Edition (with more to come)), this is what Rowan and I are doing. Note that Bradley’s books are also on Amazon (etc) and available for Kindle too. I don’t know how the pricing will work out.
The e-books will be in color (yay!). So as we copy our code from Visual Studio, we are leaving the code coloring in tact. The print books will be black & white.
We want to get all of the core writing done by mid-September, otherwise Rowan won’t be able to go attend his wedding and honeymoon. That wouldn’t be a great way to start a marriage, so we’re working hard toward this goal.
Vermont IT Jobs: .NET Developer at NRG Systems (wind power industry)
http://www.nrgsystems.com/AboutNRG/WorkingAtNRG/CareerOpportunities.aspx
Software Engineer
Job Description
August 2011
Key Focus
The Software Engineer will develop software for the collection, storage and knowledge creation of data. This position will work closely with other engineers on developing, coding and testing NRG’s software packages, which may include customer-side data analysis and communications software or in-house research and testing tools.
This is a new full-time position in the engineering department and reports to the Sensors & Towers Engineering Manager. This position will work in partnership with the engineering team to achieve the goals of the department that are in line with the company strategic plan, and will embrace the high standards of NRG ethics and core values.
Job Responsibilities
- Design operational code modules and user interfaces using Visual Studio, C#, ASP.net, Amazon Web Services (AWS), and MySQL database for NRG’s software packages
- Research and design data, decoding and testing tools for R&D engineering team
- Work on projects such as developing data analysis tools and/or utility software that can be distributed to customers. This includes providing follow-through on development from start to finish, working closely with other engineers and customer support to meet requirements
- After release, support the package with bug fixes and new features that meet customer requests, enhance, or extend the life of the product
- Work with software engineers to help develop testing and configuration tools to streamline manufacturing
Qualifications
Bachelor’s degree in software engineering field
3 – 5 years of software development experience
Technical Skills Required:
- A strong background in:
- Visual Studio, ASP.NET, AJAX
- C#
- Relational databases and the SQL language
- Object oriented programming and design patterns
- Familiarity with:
- XML
- Network Communication, TCP/IP and Network Protocols
- Serial Communication
- Amazon Web Services (AWS) experience a plus
- Good software testing practice
- Excellent written and oral communication skills
Personal Skills Required
- Ability to work effectively in teams
- Strong attention to detail
- Ability to multi-task and meet deadlines
- Independence and self-direction
- Excited to learn
Vermont IT Jobs: Business Analyst (.NET) at VT Agency of Natural Resources, Waterbury
More information and apply at https://erecruit.peoplesoft.state.vt.us/psc/HRPRD/EMPLOYEE/HRMS/c/ROLE_APPLICANT.ER_VIEW_JOBS.GBL
Enter 28694 into the “keyword” text box before clicking Search.
![]()
The Vermont Agency of Natural Resources – Information Technology Division is looking for an Enterprise Business Analyst who is an upbeat, hard working, energetic person. This position is responsible for the business process analysis; and the design and development of web base solutions for both internal and external audiences.
– Solid understanding of Object-oriented design.
– Proven knowledge of .NET Framework (ASP.NET & VB).
– Proficiency in SQL Server Enterprise Manager/Query Analyzer.
– Knowledge of relational database design; proven experience using SQL Server & T-SQL, with ability to write stored procedures, user defined functions & SQL queries.
– Ability to communicate effectively, both orally and in writing.
![]()
General Job Description
![]()
Analysis and definition of business objectives and strategies utilizing business process reengineering, workflow analysis and other related tools to identify clear and concise requirements for information technology development projects. Works in conjunction with department and agency management and staff responsible for program service delivery. Interprets existing business processes and makes recommendations on process improvements. Works with agency leadership and IT architects and project managers on an enterprise basis to ensure successful design, development and implementation of new and improved IT programs. Position reports to the CIO or another technical or professional supervisor.
![]()
Preferred Qualifications
![]()
Do you have a computer related degree?
Do you have more than 2 years experience with Visual Studio building web applications?
Do you have more than 2 years experience writing SQL queries, stored procedures, and functions?
Do you have a solid understanding of Object-oriented design?
![]()
Working Conditions
![]()
Work is performed in a standard office setting, but some travel may be required for which private means of transportation should be available. Work outside of regular business hours may be expected.
![]()
Entity Framework/WCF Data Services June 2011 CTP: Derived Entities with Related Data
Well, this change really came in the March 2011 CTP but I didn’t realize it until the June CTP was out, so I’ll call it a wash.
WCF Data Services has had a bad problem with inherited types where the derived type had a relationship to yet another type. For example, in this model where TPTTableA is a derived type (from Base)and has related data (BaseChildren).
If you expose just the Bases EntitySet (along with its derived type) in a WCF Data service, that was fine. I can browse to http://localhost:3958/WcfDataService1.svc/Bases easily.
But if I also exposed the related type (BaseChild) then the data service would have a hissy fit when you tried to access the hierarchy base (same URI as before). If you dig into the error it tells you:
“Navigation Properties are not supported on derived entity types. Entity Set ‘Bases’ has a instance of type ‘cf_model.ContextModel.TPTTableA’, which is an derived entity type and has navigation properties. Please remove all the navigation properties from type ‘cf_model.ContextModel.TPTTableA’”
Paul Mehner blogged about this and I wrote up a request on Microsoft Connect. Here’s Paul’s post: Windows Communication Foundation Data Services (Astoria) – The Stuff They Should Have Told You Before You Started
But it’s now fixed!
Using the same model, I can expose all of the entity sets in the data service and I’m still able to access the types in the inheritance hierarchy.
Here is an example where I am looking at a single Base entity and in fact this happens to be one of the derived types, notice in the category the term is cf_model.TPTA. The type is strongly typed.
You can see that strong typing in the link to the related data:
Bases(1)/cf_model.TPTA/BaseChildren
That’s how the data service is able to see the relationship, only off of the specific type that owns the relationship.
So accessing the relationship is a little different than normal. I struggled with this but was grateful for some help from data wizard, Pablo Castro.
The Uri to access the navigation requires that type specification:
http://localhost:1888/WcfDataService1.svc/Bases(1)/cf_model.TPTA/BaseChildren
You also need that type if you want to eager load the type along with it’s related data:
http://localhost:1888/WcfDataService1.svc/Bases(1)/cf_model.TPTA?$expand=BaseChildren
Note that I was still having a little trouble with the navigation (the first of these two Uris). It turns out that cassini (i.e. the asp.net Web Development Server) was having a problem with the period (.) in between cf_model and TPTA.
Once I switched the service to use IIS Express (which was my first time using IIS Express and shockingly easy!), it was fine. (Thanks again to Pablo for setting me straight on this problem.)
So it’s come a long way and if this is how it is finalized, I can live with it though I guess it would be nice to have the URIs cleaned up.
Of course you’re more likely to use one of the client libraries that hide much of the Uri writing from us, so maybe in the end it will not be so bad. I have not yet played with the new client library that came with this CTP so I can’t say quite yet.