14 lines
393 B
C#
14 lines
393 B
C#
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;
|
|
}
|
|
|
|
} |