Instantly share code, notes, and snippets.

View Contexto.cs
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Data.SqlClient;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.SqlServer;
using Microsoft.EntityFrameworkCore.Proxies;
namespace LazyLoading
{
View Program.cs
using System;
namespace LazyLoading
{
class Program
{
static void Main(string[] args)
{
var db = new Contexto();
View Contexto.cs
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Data.SqlClient;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.SqlServer;
namespace LazyLoading
{
public class Contexto : DbContext
View Orders.cs
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace LazyLoading
{
public class Orders
{
[Key]
public int OrderID {get; set;}
View Customers.cs
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace LazyLoading
{
public class Customers
{
[Key]