Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

C#

Adding SQL data to an Entities Repository

I'm currently working on the Fitness Frog application, but I was wondering how one would go about connecting data from a SQL server instead of doing the work around.

I think it's using in memory data. You want it to use persistent data in SQL Server?

6 Answers

Hey Brendon, I'm not sure if your question is general but here is an doc that explains how to connect to an Azure database using C#.

Let me know if you have a more specific question.

https://docs.microsoft.com/en-us/azure/sql-database/sql-database-connect-query-dotnet

Yup. I'm attempting to alter the application to create my own CRUD application on a SQL Server Database that I have through Azure.

Azure...awesome! There's a course here that goes through Entity Framework, but nothing about Azure. It'd be cool to get it working through Azure though! Maybe James Churchill wouldn't mind you (or a team of us) making it work through Azure.

So....it turns out that learning MVC is a beast in itself. Connecting and creating a basic CRUD application isnt that difficult, but there's a whole lot that I need to work on before I can make a fully functional one.

LOL! Yes, some folks have their entire careers out of just being MVC experts.

MVC definitely feels weird at first, but, like many things, the more you practice it the easier it gets. It's definitely something you can handle with some patience :).

I'm sure it pays dividends but if I have to deal with another OwinStartupAttribute Error I'm going to punch a hole through this monitor and the universe.

James Churchill
STAFF
James Churchill
Treehouse Teacher

Brendon,

Glad to hear that you're trying to extend the Fitness Frog app with proper data persistence! That's a great idea for additional learning and practice.

We have three courses available that'll help you to learn Entity Framework, which is a commonly used ORM (object relational mapper) in the .NET world.

Entity Framework Basics https://teamtreehouse.com/library/entity-framework-basics

Entity Framework Migrations https://teamtreehouse.com/library/entity-framework-migrations

Entity Framework with ASP.NET MVC (soon to be released) https://teamtreehouse.com/library/entity-framework-with-aspnet-mvc/upcoming

The pages for those courses describe their content so I won't cover that again here. Please let me know if you have any questions.

Thanks ~James

James Churchill , Thanks! I'll give those a shot.