MVC 5 asp.net Routing for SEO

Hi I am looking for advice on how to create MVC 5 asp.net routes that will allow me to silo my data for SEO purposes.   I have a site that prints articles stored in a database.  The articles all come from the same database table but belong in different categories. I could expand the data to include any data I need

Let's say I have 3 categories  Tools,  Maintenance, and Equipment.  I would want something like this to be my routes

/Articles/Tools/Drills
/Articles/Tools/Hammers
/Articles/Maintenance/Schedules
/Articles/Maintenance/Engineering
/Articles/Equipment/Lathe


What I have now is
Articles/1
Articles/2
Articles/3

Where the number is the database table id of the article that is read and the controller renders to the view with the ModelData

Any suggestions or links would be appreciated

Thank You
Charles BaldoSoftware DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Alexandre SimõesManager / Technology SpecialistCommented:
What is your issue exactly?

Because to fix that, all you need to do is to change your articles route to receive a category string argument instead of an int Id.
Once you have that category name, just "translate" it into an Id and do the normal query.
You can cache this list of categories so that you're not always hitting the DB for this translation process.
Otherwise you can also change the way you fetch the data to receive the text instead of the ID. With a stored procedure you can pretty much do the lookup and if it's not valid (not found) just return an error.

Honestly I would prefer having the translation on the controller because that's an UI logic that shouldn't reach the DB layer.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Charles BaldoSoftware DeveloperAuthor Commented:
Thank You
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Search Engine Optimization (SEO)

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.