Learn C#: Make a Databased App with Entity Framework
3.7 (214 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
1,299 students enrolled

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.
3.7 (214 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
1,299 students enrolled
Last updated 6/2014
English [Auto-generated]
Current price: $13.99 Original price: $19.99 Discount: 30% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 2.5 hours on-demand video
  • 2 downloadable resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll 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.
Course content
Expand all 24 lectures 02:37:44
+ Introduction
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
+ Setup
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
+ Relationships
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
+ C.R.U.D.
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
+ Conclusion
1 lecture 00:53

Thanks for watching! Please leave a comment and rating.

Preview 00:53
  • 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 this course is for:
  • 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#.