I am looking at creating an application to record gym workout(set,reps, etc) and I was wondering what framework and database backend to use. I am currently thinking C# .Net 3.5 for the framework because I am familiar with it but I'm unsure about how to store the data. Originally I was thinking of xml files and parsing through them but that seems like more work then is needed. If I was to use SQL would I be able to run that from my own machine (Windows 7) and what would be the best method to connect? ODBC, LINQ etc.
我正在寻找创建一个记录健身房锻炼(设置,代表等)的应用程序,我想知道使用什么框架和数据库后端。我目前正在考虑使用C#.Net 3.5作为框架,因为我对它很熟悉,但我不确定如何存储数据。最初我在考虑xml文件并通过它们进行解析,但这似乎需要更多的工作。如果我要使用SQL,我可以从我自己的机器(Windows 7)运行它,什么是最好的连接方法? ODBC,LINQ等
Thanks in advance
提前致谢
5 个解决方案
#1
9
Linq-to-SQL is a very easy to learn, easy to use and straightforward way to map database tables 1:1 onto domain objects in C#. You can install the free SQL Server Express editions on your machine locally, and use Linq-to-SQL against those.
Linq-to-SQL是一种非常容易学习,易于使用和直接的方法,可以将数据库表1:1映射到C#中的域对象上。您可以在本地计算机上安装免费的SQL Server Express版本,并使用Linq-to-SQL。
It has a great set of features, visual designers, and using LINQ queries against SQL Server tables is really quite powerful to use and nice to write.
它具有一系列功能,可视化设计器,并且使用针对SQL Server表的LINQ查询非常强大,使用起来非常好用。
So unless you have any specific requirements (like supporting backends other than SQL Server or such), I would definitely recommend going with Linq-to-SQL first.
因此,除非您有任何特定要求(例如支持除SQL Server之外的后端等),我肯定会建议首先使用Linq-to-SQL。
Tutorials:
- Scott Guthrie has an outstanding blog post series on Linq-to-SQL and how to use it - highly recommended
- The NerdDinner ASP.NET MVC demo app also contains Linq-to-SQL and you can learn a lot from it - great 100+ page intro tutorial as PDF or in HTML format
- a bit more advanced: Hooked On LINQ has tons of articles, demos, how-to's and so forth - for LINQ in general and Linq-to-SQL specifically
Scott Guthrie有一篇关于Linq-to-SQL以及如何使用它的优秀博客文章系列 - 强烈推荐
NerdDinner ASP.NET MVC演示应用程序还包含Linq-to-SQL,您可以从中学到很多东西 - 以PDF或HTML格式提供的超过100页的介绍教程
更高级:Hooked On LINQ有大量的文章,演示,操作方法等等 - 一般用于LINQ和专门用于Linq-to-SQL
#2
2
I would use SQL Server 2008 R2 Express for the backend. It's free and powerful enough for most smaller apps.
我会使用SQL Server 2008 R2 Express作为后端。它对大多数小型应用程序来说都是免费且强大的。
#3
1
Not quite there yet, but this looks like a great place for SQL CE 4.0. Check out ScottGu's post about it: http://weblogs.asp.net/scottgu/archive/2010/06/30/new-embedded-database-support-with-asp-net.aspx
还没有,但这看起来像SQL CE 4.0的好地方。查看ScottGu的帖子:http://weblogs.asp.net/scottgu/archive/2010/06/30/new-embedded-database-support-with-asp-net.aspx
#4
1
Since it seems to be a small utility kind of application and the database wouldn't be very large I'd suggest to use the SqlCE database. It makes sense to have the database embedded in your app rather than have a server based database. That way you could easily just copy/share your app without having to bother about the database setup.
由于它似乎是一个小实用程序类型的应用程序,数据库不会很大我建议使用SqlCE数据库。将数据库嵌入到您的应用程序中而不是拥有基于服务器的数据库是有意义的。这样,您可以轻松地复制/共享您的应用程序,而无需担心数据库设置。
#5
0
If you're willing and able to get away from Microsoft solutions. I would highly suggest taking a look at the Ruby on Rails framework as well. It's great for getting things up and running quickly.
如果您愿意并且能够摆脱Microsoft解决方案。我强烈建议你看一下Ruby on Rails框架。它非常适合快速启动和运行。
#1
9
Linq-to-SQL is a very easy to learn, easy to use and straightforward way to map database tables 1:1 onto domain objects in C#. You can install the free SQL Server Express editions on your machine locally, and use Linq-to-SQL against those.
Linq-to-SQL是一种非常容易学习,易于使用和直接的方法,可以将数据库表1:1映射到C#中的域对象上。您可以在本地计算机上安装免费的SQL Server Express版本,并使用Linq-to-SQL。
It has a great set of features, visual designers, and using LINQ queries against SQL Server tables is really quite powerful to use and nice to write.
它具有一系列功能,可视化设计器,并且使用针对SQL Server表的LINQ查询非常强大,使用起来非常好用。
So unless you have any specific requirements (like supporting backends other than SQL Server or such), I would definitely recommend going with Linq-to-SQL first.
因此,除非您有任何特定要求(例如支持除SQL Server之外的后端等),我肯定会建议首先使用Linq-to-SQL。
Tutorials:
- Scott Guthrie has an outstanding blog post series on Linq-to-SQL and how to use it - highly recommended
- The NerdDinner ASP.NET MVC demo app also contains Linq-to-SQL and you can learn a lot from it - great 100+ page intro tutorial as PDF or in HTML format
- a bit more advanced: Hooked On LINQ has tons of articles, demos, how-to's and so forth - for LINQ in general and Linq-to-SQL specifically
Scott Guthrie有一篇关于Linq-to-SQL以及如何使用它的优秀博客文章系列 - 强烈推荐
NerdDinner ASP.NET MVC演示应用程序还包含Linq-to-SQL,您可以从中学到很多东西 - 以PDF或HTML格式提供的超过100页的介绍教程
更高级:Hooked On LINQ有大量的文章,演示,操作方法等等 - 一般用于LINQ和专门用于Linq-to-SQL
#2
2
I would use SQL Server 2008 R2 Express for the backend. It's free and powerful enough for most smaller apps.
我会使用SQL Server 2008 R2 Express作为后端。它对大多数小型应用程序来说都是免费且强大的。
#3
1
Not quite there yet, but this looks like a great place for SQL CE 4.0. Check out ScottGu's post about it: http://weblogs.asp.net/scottgu/archive/2010/06/30/new-embedded-database-support-with-asp-net.aspx
还没有,但这看起来像SQL CE 4.0的好地方。查看ScottGu的帖子:http://weblogs.asp.net/scottgu/archive/2010/06/30/new-embedded-database-support-with-asp-net.aspx
#4
1
Since it seems to be a small utility kind of application and the database wouldn't be very large I'd suggest to use the SqlCE database. It makes sense to have the database embedded in your app rather than have a server based database. That way you could easily just copy/share your app without having to bother about the database setup.
由于它似乎是一个小实用程序类型的应用程序,数据库不会很大我建议使用SqlCE数据库。将数据库嵌入到您的应用程序中而不是拥有基于服务器的数据库是有意义的。这样,您可以轻松地复制/共享您的应用程序,而无需担心数据库设置。
#5
0
If you're willing and able to get away from Microsoft solutions. I would highly suggest taking a look at the Ruby on Rails framework as well. It's great for getting things up and running quickly.
如果您愿意并且能够摆脱Microsoft解决方案。我强烈建议你看一下Ruby on Rails框架。它非常适合快速启动和运行。