コード例 #1
0
 public BaseRepo(MailSenderContext context)
 {
     if (context == null)
     {
         throw new ArgumentNullException("Null DbContext");
     }
     _db    = context;
     _table = _db.Set <T>();
 }
コード例 #2
0
 public MailObsCollection(MailSenderContext context)
 {
     _context = context;
     _context.Mails.Load();
     foreach (Mail contextMail in _context.Mails)
     {
         Add(contextMail);
     }
 }
コード例 #3
0
        public SendedReceiverObsCollection(MailSenderContext context)
        {
            _context = context;

            _context.SendedReceivers.Load();                          //*
            foreach (SendedReceiver item in _context.SendedReceivers) //*
            {
                Add(item);
            }
        }
コード例 #4
0
 public PairObsCollection(IPair item, MailSenderContext context)
 {
     _context = context;
     _set     = ForDBSet(item);
     _set?.Load();
     foreach (IPair pair in _set)
     {
         Add(pair);
     }
 }