Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 10th, 2010, 11:04 AM
Authorized User
 
Join Date: Jun 2010
Posts: 24
Thanks: 10
Thanked 0 Times in 0 Posts
Default messed it up???

Hey Imar,

If I follow your example on page 481/482 adding an 'Entity Data Model file', starting with the code snippet on page 482, in my own site i get an error saying:"'Using' operand of type 'VacaturesModel.VacaturesEntities' must implement 'System.IDisposable'." Where the f#ck did I go wrong????

I put the 'imports VacatureModel' in the code behind file, the Entity Data Model file was created following the prior steps, I cannot find a mistake I made...
Code inside 'Using' statement is missing in snippet below...

Code:
Imports VacaturesModel

Partial Class Vacatures_VacaturesTotaal
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Using myEntities As New VacaturesEntities()

        End Using
    End Sub
End Class
Greetz from Sneek
Bertus

Last edited by bertus; September 10th, 2010 at 11:06 AM..
 
Old September 10th, 2010, 02:31 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Bertus,

Does the model look OK to you? That is, do you get IntelliSense on the entities variable? Maybe you gave a different name to the model? To check, open the model's designer, click somewhere on the diagram and look at the Properties window.

Also, check for other errors in the Error List.

If all of this fails, can you send me a copy of the site? If you send me a message through my site at http://imar.spaanjaars.com, I'll reply so you have my email address.

Met vriendelijke groeten ;-)

Imar'
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Retrieve and display data without tbl messed up lxu Access 0 March 21st, 2004 11:30 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.