Exemplo n.º 1
0
 public bool CheckUserId(string userId)
 {
     using (var db = new osu2008Entities1())
     {
         return(db.UserSet_Alumni.Any(x => x.UserId == userId));
     }
 }
Exemplo n.º 2
0
 public EventSet GetTByID(string id)
 {
     using (var db = new osu2008Entities1())
     {
         return(db.EventSet.FirstOrDefault(x => x.EventId == id));
     }
 }
Exemplo n.º 3
0
 public int GetIdByName(string name)
 {
     using (var db = new osu2008Entities1())
     {
         return(db.OccupationSet.First(x => x.Name == name).OccupationId);
     }
 }
Exemplo n.º 4
0
 IQueryable <EventSet_Activity> IActivityRepository.GetAll()
 {
     using (var db = new osu2008Entities1())
     {
         return(db.EventSet_Activity.ToList().AsQueryable());
     }
 }
Exemplo n.º 5
0
 public IQueryable <UserSet_Alumni> GetAll()
 {
     using (var db = new osu2008Entities1())
     {
         return(db.UserSet_Alumni /*.OfType<Activity>()*/.ToList().AsQueryable());
     }
 }
Exemplo n.º 6
0
 public IQueryable <T> GetAll()
 {
     using (var db = new osu2008Entities1())
     {
         return(db.Set <T>().ToList().AsQueryable());
     }
 }
Exemplo n.º 7
0
 public IQueryable <OccupationSet> GetAll()
 {
     using (var db = new osu2008Entities1())
     {
         return(db.OccupationSet.ToList().AsQueryable());
     }
 }
Exemplo n.º 8
0
 public IQueryable <ProgramSet> GetAll()
 {
     using (var db = new osu2008Entities1())
     {
         return(db.ProgramSet.ToList().AsQueryable());
     }
 }
 public IQueryable <AlumniAddressSet> GetAll()
 {
     using (var db = new osu2008Entities1())
     {
         return(db.AlumniAddressSet.ToList().AsQueryable());
     }
 }
Exemplo n.º 10
0
 public IQueryable <ClassYearSet> GetAll()
 {
     using (var db = new osu2008Entities1())
     {
         return(db.ClassYearSet.ToList().AsQueryable());
     }
 }
Exemplo n.º 11
0
 public UserSet GetById(string ID)
 {
     using (var db = new osu2008Entities1())
     {
         return(db.UserSet.FirstOrDefault(x => x.UserId == ID));
     }
 }
Exemplo n.º 12
0
 EventSet_Activity IActivityRepository.GetById(string ID)
 {
     using (var db = new osu2008Entities1())
     {
         return(db.EventSet_Activity.FirstOrDefault(x => x.EventId == ID));
     }
 }
Exemplo n.º 13
0
 public IList <UserSet> ShowConnectedAlumnis(string eventId)
 {
     using (var db = new osu2008Entities1())
     {
         var join = db.EventSet.Where(c => c.EventId == eventId).Include(z => z.UserSets).FirstOrDefault();
         return(join.UserSets.ToList());
     }
 }
Exemplo n.º 14
0
        public IQueryable <EventSet> GetAll()
        {
            osu2008Entities1 osu2008Entities1 = new osu2008Entities1();
            var s = from c in osu2008Entities1.EventSet
                    select c;

            return(s);
        }
Exemplo n.º 15
0
 public void Create(EventSet _event)
 {
     using (var db = new osu2008Entities1())
     {
         var _entity = _event;
         db.Set <EventSet>().Add(_entity);
         db.SaveChanges();
     }
 }
Exemplo n.º 16
0
 public void Create(T entity)
 {
     using (var db = new osu2008Entities1())
     {
         var _entity = entity;
         db.Set <T>().Add(_entity);
         db.SaveChanges();
     }
 }
Exemplo n.º 17
0
 public void DeleteById(string eventId)
 {
     using (var db = new osu2008Entities1())
     {
         var entity = db.EventSet.Where(x => x.EventId == eventId).FirstOrDefault();
         db.EventSet.Remove(entity);
         db.SaveChanges();
     }
 }
Exemplo n.º 18
0
        public void Create(ProgramSet _program)
        {
            using (var db = new osu2008Entities1())
            {
                var program = _program;

                db.ProgramSet.Add(_program);
                db.SaveChanges();
            }
        }
Exemplo n.º 19
0
        public void Create(AlumniAddressSet _alumniAddress)
        {
            using (var db = new osu2008Entities1())
            {
                var alumniAddress = _alumniAddress;

                db.AlumniAddressSet.Add(_alumniAddress);
                db.SaveChanges();
            }
        }
Exemplo n.º 20
0
        public void Create(OccupationSet _occupation)
        {
            using (var db = new osu2008Entities1())
            {
                var occupation = _occupation;

                db.OccupationSet.Add(_occupation);
                db.SaveChanges();
            }
        }
Exemplo n.º 21
0
        public void Create(ClassYearSet _classYear)
        {
            using (var db = new osu2008Entities1())
            {
                var classYear = _classYear;

                db.ClassYearSet.Add(_classYear);
                db.SaveChanges();
            }
        }
Exemplo n.º 22
0
        public void Create(UserSet_Alumni _alumni)
        {
            using (var db = new osu2008Entities1())
            {
                var alumni = _alumni;

                db.UserSet_Alumni.Add(_alumni);
                db.SaveChanges();
            }
        }
Exemplo n.º 23
0
        public void Create(UserSet _user)
        {
            using (var db = new osu2008Entities1())
            {
                var user = _user;

                db.UserSet.Add(_user);
                db.SaveChanges();
            }
        }
Exemplo n.º 24
0
        public void AttachUser(string id, string userID)
        {
            using (var db = new osu2008Entities1())
            {
                var _event = db.EventSet.Where(x => x.EventId == id).Include(x => x.UserSets).FirstOrDefault();
                var _user  = db.UserSet.Where(x => x.UserId == userID).FirstOrDefault();

                _event.UserSets.Add(_user);

                db.SaveChanges();
            }
        }