EF CodeFirst

Jul 6, 2012 at 11:00 PM

Can you replace SqlSingleWebServer with EF CodeFirst?

If that is not an option, will you post a sample web.config with sample configuration?

The Setup program does not seem work with a hosted server.

Coordinator
Jul 7, 2012 at 2:06 AM

What possible benefit would you get by putting an abstraction layer around the data access? The SQL implementation works fine as is.

I'd love to help you, but "does not seem to work" isn't a lot to go on.

Jul 7, 2012 at 3:08 PM

Seperating physical persistence layer from domain models allows me to replace it with any database I choose such as MySql, DB2, or etc.

Also it will be  for me to test, maintain, and enhance the application because I am not good at SQL.  

As for the setup program, when I typed "forums/setup", it simply did not work in my case.  I rather configure web.config manually.  All I need is a simple instruction on a typcial configuration.

 

Coordinator
Jul 7, 2012 at 3:43 PM

Honestly, it would be less work to tweak the SQL for other DB's. The only thing in there that's exotic is perhaps the paging logic (using common table expressions). I can tell you for sure that I wouldn't endeavor to rewrite the data layer because it's not something I would ever use. That's the magic of open source though... someone else can. :)

I still need more than "didn't work." The only thing you set in the web.config is the database connection string. The rest of the settings are persisted in the database. The setup creates all of the tables and your first user account, setup as an administrator.

Jul 8, 2012 at 3:25 PM

Thanks for your answer.  I understand most of your point, assuming that  most developers know both c# and SQL. (I do not know SQL.)

However, I would still allow developers to set all the settings in web.config file instead of persisting them in the database.

By the way, I liked the rating and scoring codes in this project.

 

 

Jul 8, 2012 at 9:44 PM

I made it work by runnung the PopForums.sql script and commenting out the database setup and check.

Now I do not see any button on posting a new topic. My role is Admin and Moderator.

Coordinator
Jul 8, 2012 at 10:02 PM

There's no reason to comment anything out... all setup does is see if there's a database table that it can hit.

You can't post anything because you haven't set up any forums, as indicated in the documentation.

Jul 9, 2012 at 1:00 AM
Edited Jul 9, 2012 at 1:04 AM

Thanks for the tip. I created the database and ran the script to create all the tables.  Since I now have the database with the tables, I did not need the the database setup and check.  Also   I had to type 'forums/admin' to bring up the admin page.  I expected to see the admin menu in the /forums index view, especially if you are signed in and your role is admin.   Maybe I am not a typical developer but I now see how the app works.  The last question I have is how to vote for a post or for a reply.