Instantly share code, notes, and snippets.

Embed
What would you like to do?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EFAsNoTracking
{
public class Dados
{
private Contexto _contexto;
public Dados(Contexto contexto)
{
_contexto = contexto;
}
public Categories GetCategory(int id) => _contexto.Categories.First(c => c.CategoryID == id);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment