TVF Example in Chapter 10

At least one reader has encountered a problem with the Table-Valued Function (TVF) example in Chapter 10 of Microsoft ADO.NET Entity Framework Step by Step when working with Visual Studio 2013. Before you begin this example, make absolutely certain that you have setup and configured SQL Server for use with the book. You can find the required instructions in these posts:

In addition, you must start the SQL Server Browser. Otherwise, the example will never work.

First, the good news—the example does in fact run. If you use the downloadable source code, rather than trying to type the example in by hand, you can see it function and work through the example using any technique you like (such as the debugger). However, as I pointed out in Entity Framework Examples – Visual Studio 2013 Update, this book really is designed to work best with Visual Studio 2012, so it’s not unexpected that you may encounter problems if you don’t follow the guidelines in the System Requirements section of the Introduction (page xxii).

The bad news really isn’t that bad. You may see an error, “Error 3027: No mapping specified for the following EntitySet/AssociationSet – ObtainClientsEntities” when you compile the example.  The example will still work, but the error message is disconcerting. Unfortunately, I haven’t been able to reproduce it on my system using Visual Studio 2012. You may be able to rid yourself of this error message by erasing the .suo files in the example file and doing a complete rebuild of the example.

In addition, when you open the Rewards2Model.edmx file in the XML editor, you may see “Error 11007: Entity type ‘ObtainClientsEntity’ is not mapped.” Again, I haven’t been able to reproduce this error. There is some discussion that you really must create the table before creating the example application in order to avoid this error. However, taking that step would reduce the usefulness of the technique. Again, the example works just fine even with this error in place.

What is need to know is whether these two errors are common and what I need to do to reproduce them. It may be that there is a quick fix that has so far eluded notice. In the meantime, it’s safe to ignore the two errors because the example does run, even when you’re working with Visual Studio 2013. Please contact me with your findings at


Author: John

John Mueller is a freelance author and technical editor. He has writing in his blood, having produced 99 books and over 600 articles to date. The topics range from networking to artificial intelligence and from database management to heads-down programming. Some of his current books include a Web security book, discussions of how to manage big data using data science, a Windows command -line reference, and a book that shows how to build your own custom PC. His technical editing skills have helped over more than 67 authors refine the content of their manuscripts. John has provided technical editing services to both Data Based Advisor and Coast Compute magazines. He has also contributed articles to magazines such as Software Quality Connection, DevSource, InformIT, SQL Server Professional, Visual C++ Developer, Hard Core Visual Basic, asp.netPRO, Software Test and Performance, and Visual Basic Developer. Be sure to read John’s blog at When John isn’t working at the computer, you can find him outside in the garden, cutting wood, or generally enjoying nature. John also likes making wine and knitting. When not occupied with anything else, he makes glycerin soap and candles, which comes in handy for gift baskets. You can reach John on the Internet at John is also setting up a website at Feel free to take a look and make suggestions on how he can improve it.