using System.Security.Cryptography; using System.Text; using Entidades.Dto; using Entidades; using Microsoft.EntityFrameworkCore; namespace Modelo; public class RepositorioNotificaciones : RepositorioBase { public bool MarcarComoLeido(long dni, DateTime? fecha) { if (fecha == null) return false; var con = Context; Notificacione? noti = con.Notificaciones.FirstOrDefault(x=> x.Dnicliente == dni && x.Fecha == fecha); if (noti == null) return false; noti.Leido = true; return Guardar(con); } public bool AltaNotificacion(Notificacione n) { var con = Context; con.Notificaciones.Add(n); return Guardar(con); } }