예제 #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);
 }
예제 #3
0
        public int Add(T item)
        {
            //Set.Add(item);
            _db.Entry(item).State = EntityState.Added;
            _db.SaveChanges();

            return(item.Id);
        }
예제 #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);
        }
예제 #5
0
 public Sender Add(Sender Item)
 {
     _db.Entry(Item).State = EntityState.Added;
     _db.SaveChanges();
     return(Item);
 }
예제 #6
0
 public Message Add(Message Item)
 {
     _db.Entry(Item).State = EntityState.Added;
     _db.SaveChanges();
     return(Item);
 }
예제 #7
0
 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);
 }
예제 #9
0
 public T Add(T Item)
 {
     _db.Entry(Item).State = EntityState.Added;
     _db.SaveChanges();
     return(Item);
 }