public int Create(EventDetailStatusModel eventDetailStatus) { var res = AutoMapper.MapItem <EventDetailStatusModel, DAL.EventDetailStatu>(eventDetailStatus); dbContext.EventDetailStatus.Add(res); return(dbContext.SaveChanges()); }
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()); }