public int Add(TurBileti turBileti)
        {
            context.TurBileti.Add(turBileti);
            int value = context.SaveChanges();

            return(value);
        }
        public int Delete(TurBileti TurBileti)
        {
            var entity = context.Entry(TurBileti);

            entity.State = System.Data.Entity.EntityState.Deleted;
            int value = context.SaveChanges();

            return(value);
        }
        public int Update(TurBileti turBileti)
        {
            var entity = context.Entry(turBileti);

            entity.State = System.Data.Entity.EntityState.Modified;
            int value = context.SaveChanges();

            return(value);
        }
        public TurBileti GetById(int id)
        {
            TurBileti selected = context.TurBileti.SingleOrDefault(x => x.Id == id);

            return(selected);
        }
Example #5
0
 public bool Delete(TurBileti turBileti)
 {
     return(manager.Delete(turBileti) > 0);
 }
Example #6
0
 public bool Update(TurBileti turBileti)
 {
     return(manager.Update(turBileti) > 0);
 }
Example #7
0
 public bool Add(TurBileti turBileti)
 {
     return(manager.Add(turBileti) > 0);
 }