|
|
Hello, this sample is compatilble with the latest version framework 4.5? Tks!
It is compatible with 4.5, however, if you're using 4.5 you should follow one of the MVC 4 tutorials. http://www.asp.net/mvc/tutoria ls/mvc-4/gettin g-started-with- aspnet-mvc4/int ro-to-aspnet-mv c-4 (Visual Studio 2010) or Intro to ASP.NET MVC 4 Beta with Visual Studio 11 Beta ( http://www.asp. net/mvc/tutoria ls/mvc-4/gettin g-started-with- aspnet-mvc-4-an d-visual-studio -2011/intro-to- aspnet-mvc-4 )
First problem. I downloaded the vb.net example but there was no file "movies.sdf" inside App_Data folder. Second, I tried to create controller "MoviesController" but it showed up message: "Unable to retrive metadata for 'MvcMovie.Movie '. Using the same DbCompiledModel to create context against different types of database servers is not supported. Instead, create a separate DbCompiledModel for each type od server being used". I dont understand this suggestion. Please, help.
i folow your tutorial to make this app,it can run,but.....whatever it run or stop ,i cant find the movies.sdf in the app_data. and i cant search this movies.sdf in the windows.... wheres the movies.sdf windows 8 and vs2012UTI
oh!ah! i know why!!! because i make the MoviesController with ues the connectionstrin g, after i use the connectionstrin g and then make the MoviesControlle r, the probler was solved
http://www.asp.net/mvc/tutoria ls/getting-star ted-with-aspnet -mvc3/cs/access ing-your-model' s-data-from-a-c ontroller I'm up to this page in your tutorial where you say to check for Movies.sdf in App_Config, and it's not there. I've clicked "show all files", I've browsed to the folder in windows explorer, searched the computer, and it's nowhere. This is my connection string: <add name="MovieDBCo ntext" connectionStrin g="Data Source=|DataDir ectory|Movies.s df" providerName="S ystem.Data.SqlS erverCe.4.0"/> Everything's working fine, but I cant find and view the database. Any ideas?
Not, config directory, the data dir. You can verify that it's been created by looking in the App_Data folder. If you don't see the Movies.sdf file, click the Show All Files button in the Solution Explorer toolbar, click the Refresh button, and then expand the App_Data folder.
Hi, I'm on http://www.asp.net/mvc/tutoria ls/getting-star ted-with-aspnet -mvc3/cs/access ing-your-model' s-data-from-a-c ontroller and I'm told that the Movies.sdf should be created automatically in the App_Data directory. It's not there. The app works, data is persisted. I have commented out both the connection strings and it still works, although not after a re-boot. My connection strings are: <connectionStri ngs> <add name="DefaultCo nnection" providerName="S ystem.Data.SqlC lient" connectionStrin g="Data Source=(LocalDb )\v11.0;Initial Catalog=aspnet- MvcMovie-201301 12235330;Integr ated Security=SSPI;A ttachDBFilename =|DataDirectory |\aspnet-MvcMov ie-201301122353 30.mdf" /> <add name="MovieDBCo ntext" connectionStrin g="Data Source=|DataDir ectory|Movies.s df" providerName="S ystem.Data.SqlS erverCe.4.0" /> </connectionStr ings> Any idea what's going on? Where is the app persisting the data? Thanks in advance, Dave
For those of us who arent ef fans, sure would be nice if you included sql scripts to populate database tables, such as are available for adventureworks and your other sample tables.
Getting the following using what is in the tutorial. The model type is invalid> Please select an item from the list. Alsp how can I tell that I am using .Net 4. I have VS 2010 and Microsoft Visual Web Developer 2010 Express. I have used the web installer for VWD 2010 and downloaded it for VS 2010 Ultimate. Thank you LadyDee
Use the links provided at the beginning of the tutorial to install VWD/SP1 or Visual Studio 2010/SP1 and the Tools Update for ASP.NET MVC 3
I did everything stated that needed to be install and still when I try to put Movie (MvcMovie.Models) and MovieDBContext (MvcMovie.Model s) that is when I get the invalid error. Thank you Ladydee
I got the same thing. What I did was make sure there was a space in those: Movie<space>(MvcMovie.Models) and MovieDBContext< space>(MvcMovie .Models)
I have the the same problem as you ladydee123 but what i did is I do the Build at Debug menu first and then the Movie(MvcMove.Models) et al will now show up on the list. I know this kind of late reply ;-) But this could be helpful for others who had just recently encountered the problem.
I download the C# version of the code sample. However I am having trouble loading the MvcMovie.csproj file. Error in PropertyGroup section with MvcBuildViews tag: The schema in msbuild/2003 has invalid child element. Can you help? Harry
Sorry I am a newbie at ASP.NET and MVC 3. Here is a list of the errors I get when I just try to open the VB.NET download in Visual Studio 2010 Professional. Again the C# version works fine. Error 4 'SaveChanges' is not a member of 'MvcMovie.MovieDBContext'. Error 6 'Entry' is not a member of 'MvcMovie.Movie DBContext'. Error 7 'SaveChanges' is not a member of 'MvcMovie.Movie DBContext'. Error 9 'SaveChanges' is not a member of 'MvcMovie.Movie DBContext'. Error 10 'Database' is not declared. It may be inaccessible due to its protection level. Error 11 Type 'DbContext' is not defined. Error 12 Type 'DbSet' is not defined. Error 13 Type 'DropCreateData baseIfModelChan ges' is not defined. Error 14 sub 'Seed' cannot be declared 'Overrides' because it does not override a sub in a base class. Is there something I am not doing properly before I open the VB.NET file? I want to study how this works but I don't know why the VB.NET version is not working by following the instructions for the prerequisites listed on the site and I can't get it to work. Thanks to anyone for any help you mey be able to provide! Regards, Steve
I have tried to open the VB.NET download on 2 different computers using Visual Studio 2010 Professional and get the same 9 errors. The C# download works fine on both systems but I need to work with VB.NET. Please let me know if there is a fix or updated download. Thanks!