lo que hice hoy
This commit is contained in:
14
Modelo/RepositorioCanons.cs
Normal file
14
Modelo/RepositorioCanons.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using Entidades;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace Modelo;
|
||||
|
||||
public class RepositorioCanons: RepositorioBase<RepositorioCanons> {
|
||||
public ICollection<Canon>? ObtenerCanonsPorContrato(int id) {
|
||||
var con = Context;
|
||||
var l = con.Contratos.Include(x=>x.Idcanons).FirstOrDefault(x => x.Id == id);
|
||||
if (l == null) return null;
|
||||
return l.Idcanons;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user