Learn C#: Make a Databased App with Entity Framework
4.2 (89 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
824 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Learn C#: Make a Databased App with Entity Framework to your Wishlist.

Add to Wishlist

Learn C#: Make a Databased App with Entity Framework

Learn how to create an application in C# that can generate it's own database using Entity Framework and Code First.
4.2 (89 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
824 students enrolled
Last updated 6/2014
Current price: $10 Original price: $20 Discount: 50% off
5 hours left at this price!
30-Day Money-Back Guarantee
  • 2.5 hours on-demand video
  • 1 Supplemental Resource
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • By the end of the course you will be able to define and build an SQL database using only C# code. No database development required!
  • Perform CRUD operations (Create, Read, Update, Delete) on entities using C# code.
  • Handle entity changes using Code First Migrations.
  • For the majority of the course, we will do absolutely no database development! However, we will show how to call custom SQL statements if you need to.
View Curriculum
  • A basic knowledge of C# and Visual Studio.
  • Microsoft Visual Studio 2012, 2013 or later is required. We show how to install Visual Studio Express if you don't already have it.

In this course you will learn how to create a simple C# application using Microsoft Visual Studio that creates and connects to an SQL Database with the Entity Framework*, with no database development required!

We will use Code First development principals to define all database tables and columns using only C# code.

All database tables and columns will be generated automatically from the C# code without the need to edit the database directly. As such we will be doing no database development (except for a section on calling SQL statements directly if you need to).

All source code is included as a Microsoft Visual Studio 2013 project so you can get up and running straight away.

Thank you for choosing this course and we look forward to viewing your positive reviews and feedback.

MPire Solutions Pty Ltd

* Note: The Entity Framework is Microsofts' newest data access technology, and Code First allows us to create database driven applications using only C# code, with no database development required!

Who is the target audience?
  • This course is recommended for C# developers who want to learn how to use the latest Microsoft .Net database technologies.
  • Students should have at least a basic knowledge of C# and Visual Studio.
  • While much of the code is simple C#, this course is specifically about Entity Framework Code First and is NOT an introduction to C# or building an application with C#.
Students Who Viewed This Course Also Viewed
Curriculum For This Course
24 Lectures
3 Lectures 04:38

Course introduction and contents.

Preview 02:26

Define a specification for the simple example sales application.

Preview 02:12

Download the "Entity Framework Cheat Sheet" and Source Code to the sample application.

Entity Framework Cheat Sheet and Source Code
18 pages
2 Lectures 05:44

You'll need to have Microsoft Visual Studio to do this course. If you don't already have it installed, this quick video will show you how to get the free Express Edition.

Preview 02:19

Create the example C# Windows Forms application in Microsoft Visual Studio and reference Entity Framework using NuGet.

Preview 03:25
The Models
4 Lectures 14:18

Create the bare-bones models (entities) as C# classes.

Preview 03:32

Create a base model which all other models can inherit from. Code reuse reduces the amount of code we need to write!

Creating a Base Model

Create an interface that flags a model as being active or inactive.

Inactive Models

Data Annotations
2 Lectures 11:41

Connect models together in one-to-one relationships.

One-to-One Relationships

Connect models together in one-to-many relationships.

One-to-Many Relationships
Data Context
5 Lectures 41:22

Create a very simple Data Context to connect to the database.

Simple Data Context

Add more advanced functionality to the Data Context, such as soft deletion and simple auditing.

Advanced Data Context

After creating the Models and Data Context, we can now generate an SQL Database automatically from the code.

Generate the Database!

Learn how to change your Models and update your database accordingly with Migrations.

Dealing with Change

Insert core data into the database automatically using Seeding.

Seeding Data
4 Lectures 46:32

Learn how to Read lists of items and single items from the database.

R: Read

Learn how to Create a new Sale and save it to the database.

C: Create

Learn how to Update an existing Sale and save it to the database.

U: Update

Learn how to Delete a Sale from the database.

D: Delete
Extra Topics
3 Lectures 14:36

How to use Enumerations in your Models.

Extra: Using Enumerations

Customize the Table and Column names that Entity Framework will use to generate the database.

Extra: Changing Table and Column Names

Upgrading to Entity Framework 6.1 and a brief introduction to the Index attribute to quickly create database indexes on tables.

Extra: Entity Framework 6.1 + Index Attribute
1 Lecture 00:53

Thanks for watching! Please leave a comment and rating.

Preview 00:53
About the Instructor
Matt Turner
4.3 Average rating
324 Reviews
12,113 Students
2 Courses
Software Developer and Trainer at MPire Training

I am a trainer for MPire Training, where we create high quality online training focusing on web technologies.

I have been a commercial software developer for over 15 years, building Web and Windows applications for businesses. I run a software development company that produces fast web applications for businesses.

MPire Training
4.3 Average rating
338 Reviews
12,525 Students
4 Courses
We help businesses get online fast and prosper!

We offer a variety of services which range from training in all kinds of industries and marketing strategies to assist businesses to prosper online.

We have over 20 years experience in the IT industry which consist of website design, Microsoft .Net programming, Database development, Online Marketing and Training.