Do you know, you can return JSON data from a SQL query? It is very useful in writing REST or GraphQL API on the top of a SQL Server Database. Let us say you have two tables as shown below, And an emp table as below, You can query employees with their departments as below, … Continue reading Return JSON from a SQL Query
Data
Related entities in Entity Framework Code First approach
In this post we will learn to create relationship between entities in the Entity Framework Code First approach. Setting up We are going to create three tables and set up the relationship between them. BankUser BankUserAccount Nomniee To create tables we will create entities further in the post. For table creation the context class has … Continue reading Related entities in Entity Framework Code First approach
Video : One to one relationship between entities in Entity Framework Code First
https://www.youtube.com/watch?v=Ku3nsBW4bNQ&feature=youtu.be Container.cs Product.cs EFContext.cs
Getting started with Code First Approach and Entity Framework Migrations Commands
In this post we will walk through basics of Entity Framework migration commands and learn about Code First Approach. Entity Framework allows you to create database from plain classes. You can model your domain into classes and subsequently database can be created or updated from the model using Entity Framework.