예제 #1
0
        public int Create(EventDetailStatusModel eventDetailStatus)
        {
            var res = AutoMapper.MapItem <EventDetailStatusModel, DAL.EventDetailStatu>(eventDetailStatus);

            dbContext.EventDetailStatus.Add(res);

            return(dbContext.SaveChanges());
        }
예제 #2
0
        public int Update(EventDetailStatusModel eventDetailStatus)
        {
            var res = AutoMapper.MapItem <EventDetailStatusModel, DAL.EventDetailStatu>(eventDetailStatus);

            //dbContext.Tournaments.Attach(res);

            dbContext.Entry(res).State = EntityState.Modified;

            return(dbContext.SaveChanges());
        }