Exemple #1
0
 public T Add(T Item)
 {
     _db.Entry(Item).State = EntityState.Added;
     //_db.Recipients.Add(Item);
     _db.SaveChanges();
     return(Item);
 }
 public Recipient Add(Recipient item)
 {
     _db.Entry(item).State = EntityState.Added;
     //_db.Recipients.Add(item);
     _db.SaveChanges();
     return(item);
 }
Exemple #3
0
        public int Add(T item)
        {
            //Set.Add(item);
            _db.Entry(item).State = EntityState.Added;
            _db.SaveChanges();

            return(item.Id);
        }
Exemple #4
0
        public T Remove(int id)
        {
            var db_item = GetById(id);

            if (db_item != null)
            {
                _db.Entry(db_item).State = EntityState.Deleted;
            }

            return(db_item);
        }
 public Sender Add(Sender Item)
 {
     _db.Entry(Item).State = EntityState.Added;
     _db.SaveChanges();
     return(Item);
 }
 public Message Add(Message Item)
 {
     _db.Entry(Item).State = EntityState.Added;
     _db.SaveChanges();
     return(Item);
 }
 public Recipient Add(Recipient Item)
 {
     _db.Entry(Item).State = EntityState.Added;
     _db.SaveChanges();
     return(Item);
 }
 public SchedulerTask Add(SchedulerTask Item)
 {
     _db.Entry(Item).State = EntityState.Added;
     _db.SaveChanges();
     return(Item);
 }
Exemple #9
0
 public T Add(T Item)
 {
     _db.Entry(Item).State = EntityState.Added;
     _db.SaveChanges();
     return(Item);
 }