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.4 (47 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.
600 students enrolled
$20
Take This Course
  • Lectures 24
  • Contents Video: 2.5 hours
    Other: 18 mins
  • Skill Level Intermediate Level
  • Languages English
  • Includes Lifetime access
    30 day money back guarantee!
    Available on iOS and Android
    Certificate of Completion
Wishlisted Wishlist

How taking a course works

Discover

Find online courses made by experts from around the world.

Learn

Take your courses with you and learn anywhere, anytime.

Master

Learn and practice real-world skills and achieve your goals.

About This Course

Published 2/2014 English

Course Description

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!

What are the requirements?

  • 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.

What am I going to get from this course?

  • 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.

What 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#.

What you get with this course?

Not for you? No problem.
30 day money back guarantee.

Forever yours.
Lifetime access.

Learn on the go.
Desktop, iOS and Android.

Get rewarded.
Certificate of completion.

Curriculum

Section 1: Introduction
02:26

Course introduction and contents.

02:12

Define a specification for the simple example sales application.

18 pages

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

Section 2: Setup
02:19

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.

03:25

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

Section 3: The Models
03:32

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

03:16

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

02:21

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

Data Annotations
05:09
Section 4: Relationships
04:33

Connect models together in one-to-one relationships.

07:08

Connect models together in one-to-many relationships.

Section 5: Data Context
02:15

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

17:52

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

08:45

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

04:36

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

07:54

Insert core data into the database automatically using Seeding.

Section 6: C.R.U.D.
24:43

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

09:24

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

07:16

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

05:09

Learn how to Delete a Sale from the database.

Section 7: Extra Topics
02:10

How to use Enumerations in your Models.

05:38

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

06:48

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

Section 8: Conclusion
00:53

Thanks for watching! Please leave a comment and rating.

Students Who Viewed This Course Also Viewed

  • Loading
  • Loading
  • Loading

Instructor Biography

Matt Turner, 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.

Instructor Biography

MPire Training, 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.

Ready to start learning?
Take This Course