0
votes

I need in education to do win-forms app, recently I done project on asp.net, there I created without any problem new SQL Server database and send it to SQL Server, and added it to project.

But how can I do this using simple windows forms? Are there any good tutorials? (also I need something like db designer).

On asp.net mvc I use linq... But couldn't find good tutorial for create, send and attach SQL Server database on winforms.

I do this with .net 4.0 and SQL Server 2008 and Microsoft Visual Studio 2010

1
Database product is called SQL Server (not mssql) - and there is no SQL Server 2010 version - you have 2005, 2008, 2008 R2 and 2012 (Visual Studio 2010 comes with SQL Server 2008 Express, if that's what you're using) - marc_s
What do you mean "create, send and attach"? Creating a database and attaching it can be done via the Management Studio, but what on earth do you mean by "send"? - Arran
You should be able to do it exactly the same way. - Bobson
@Arran send)) mean send it to my winforms app... as db service - byCoder

1 Answers

0
votes

You can use Entity Framework Code First to design your db and then call Database.SetInitializer to create the database. Take a look at this article Understanding Database Initializers in Entity Framework Code First