MVC 4 Querying Database - asp.net

I am new to ASP.NET MVC and have gone through this tutorial: http://www.asp.net/mvc/tutorials/mvc-4/getting-started-with-aspnet-mvc4/adding-a-view
It was pretty good at explaining of how MVC works but I need to use existing database (SQL Server) that returns all the information from the table and displays it on a web page. Does anyone know of a tutorial or example of how this is done or how I would go about doing this?
Thanks

You need to use Database first approach. You can get a good number of tutorials by searching for it on google.

Related

Facebook Application using ASP.NET

I want to develop a Facebook application (it is a simple quiz with 3 questions) using ASP.NET, but this is the first time that I've even tried doing it. I have found lots of confusing information on the internet and I wanted to ask what is the best and most correct way to do it (an API or something) and if there is a simple tutorial to get me started. Thanks in advance.
The way I've previously done this is to create a standard ASP.NET MVC application and use the .NET API:
http://facebooktoolkit.codeplex.com/

How to start using MongoDB?

Can any one tell me how to start using MongoDB with ASP.NET and C#?
I have Visual Studio 2005 and I'm not using ASP.NET MVC.
Thank you!
Have you read the "Getting started" section of the MongoDB docs?
There's even a page with various C#-drivers for mongo.
If you run into any problems after reading what you can find there I'd be glad to help, but if you don't have any problems and just need step by step directions, that site is definitely where to start. Stackoverflow (or any other stackexchange-site) is not. Come back when you have an actual question :)

asp.net MVC 2 Database localization. Multilang app

I have a multilanggual website. I would like to store Locatilzation in database instead of ressource file.
If somebody has good tutorial or documentation about that, I appreciate to access these doc.
The best place to start is http://msdn.microsoft.com/en-us/library/aa905797.aspx I have followed this process in a number of projects very successfully
You can use the Data Driven Resource provider from Rick Strahl

Topics I should learn for converting this Classic-ASP code into ASP.NET? Mainly SQL Server Database Access

So, I have a very simple bit of ASP on my website currently, which you can check out here: http://www.marioplanet.com/catalog.asp
Just ignore the CSS issue for now! :)
Anyway, so, I have a SQL Server table in a database, and I'm pulling some information from it to make a shopping catalog of all my products.
I was wondering if there is any need to convert this to ASP.NET, and if I should, as I'm eager to learn how, which topics of ASP.NET does this include?
I would assume handling data through a SQL Server Database Table?
Also, which ASP.NET framework is best suited for this kind of work? For the most part, the only ASP.NET code I'm going to be using, is going to be handling data from a database. Other than a few conditionals and what not.
Any ideas and suggestions are greatly appreciated!
Thanks!!
If you are comfortable in classic ASP, I wouldn't rush to change it.
However, if I were to convert it, I would lean toward ASP.NET MVC because it is closer to classic ASP than ASP.NET with WebForms.
There are numerous data frameworks. I think LINQ to SQL has a lot of momentum and would be fairly easy to learn coming from a classic ASP background.

Using asp.net membership with sqlite or other provider?

Does anyone have any examples of using Sqlite with ASP.NET membership? I am building a small "drop-in" type web application and don't want to rely on an SQL database for storing user credentials, etc. Sqlite seems like a good option, and I have been impressed with its performance in Elmah; I wouldn't mind using xml as a data store either.
On another note, perhaps asp.net membership isn't a good choice for basic form level security? The app will not require more then a couple users for those who implement it, and at this time I don't see a need for roles. My thought of using asp.net membership is simplicity to setup and get running; why build a security class if I don't need to, right?
Any other suggestion are surely welcome; thank you for your time.
It looks like Roger Martin's project - http://www.codeproject.com/KB/aspnet/SQLite-Providers.aspx - is now the recommendation for SQLite connectivity.
This is suggested by Peter Bromberg (http://twitter.com/peterbromberg/status/5031854389) and the next top resource on Google is the above by Roger Martin, who suggests that as the place to get the provider (http://galleryserverpro.blogspot.com/2009/08/new-release-adds-support-for-flash.html#comments).
Seeing as how it's part of a semi-commercial product (and the author is trying to get back to work on it as a full-time job), it seems this will be kept up to date.
EDIT 1: More information about the ordering of released providers for SQLite: http://sqlite.phxsoftware.com/forums/p/75/397.aspx
I am a big fan of SQLlite as well. I would say asp.net membership is good enough for the basic stuff.
Peter at Eggheadcafe has this right article about sqllite, check it out.
Article
For using the membership provider with other databases look at a custom membership provider
There's a new, updated source for Roger Martin's SQLiteMembershipProvider
nuget package: https://www.nuget.org/packages/SQLiteMembershipProvider
sourcecode: https://bitbucket.org/jkuemerle/sqlitemembershipprovider

Resources