Created
December 2, 2018 20:32
-
-
Save carloscds/89f79b8892dcc291fe9155a1cd218ddb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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