开发者

Programming without a DB

I have a project to work on. The project requires SQL server. I am using LINQ. So since I dont have SQL server installed on my computer, is it possible I can just use the LINQ designer to create my classes? And then when I do publish my website to a online hosting company, I can use the LINQ to create the tables and stuff?

Is this overly complicated? I want to stay away from using SQLite, or SQL Server Express or SQL server compact because its hard to transfer stuff. Atleast for me. My one problem is also that I want to use ASP.NET Membership stuff. If I run the .exe tool to automati开发者_运维知识库cally create my tables, how would I accomplish this without using a db? I tried using SQL server compact (mdf file i think?) but apparently the tool does not support it.

So what are my options here. I'd like to being programming right away however paying for hosting online is just a waste of money for me right now until i have some of the project done.


I'd suggest installing SQL Server Express Edition on your computer and using that as your database during development. I know that there can be some confusion and difficulty when upgrading your development database from SQL Server Express Edition to the professional edition on the hosting company's database servers, but I'm confident that the time you will need to spend on that will be dwarfed by the time you'd need to spend to build and use a mock database layer, not to mention the extra testing you'd need to do once you moved to a real database.

Also, the challenge in moving from SQL Server Express Edition to the professional edition at the hosting company shouldn't be too bad if you choose a web host that has tools for importing your SQL Server Express Edition database into their database server. (Some have it so you can just upload your SQL Server Express .mdf file and it will automatically import it into their database server.)


Two things you can do

  1. Install Sql Server Express on your development machine (or a server on your LAN). This way you will have a local database to develop and test on.
  2. Not necessary, but you "could" try to use Entity Framework in place of LINQ, and use Code First mapping.

Also with Sql Server Express, you can do a lot of your database work right from Visual Studio (providing you're running VS Pro).

I want to stay away from using SQLite, or SQL Server Express or SQL server compact because its hard to transfer stuff. Atleast for me.

Upgrading shouldn't be too difficult.

My one problem is also that I want to use ASP.NET Membership stuff. If I run the .exe tool to automatically create my tables, how would I accomplish this without using a db? I tried using SQL server compact (mdf file i think?) but apparently the tool does not support it.

aspnet_regsql.exe works on Sql Server Express


Use SQL Server Express. It is free. Easy to install in your development environment. In SQL Server Management Studio (SSMS), you can right-click on a table and generate scripts to create the table if you did this from the graphical designer. All you have to do is run the script on the new server. There are free tools that can create/transfer data as well.

What are you going to do down the road when you need to test changes? I hope you don't plan on using the production database.


Just generate your entities by hand, later you would be able to easily attach SQL Server to all this stuff. Create classes and mark them with required attributes (I don't remember their exact name,check MSDN) P.S I just can't believe SQL Server Express is not enough for you )

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜