Ejemplo n.º 1
0
        public override Event Update(Event entity)
        {
            var dbUnit = RepositoryDbContext.AdministrativeUnitInEvents.Where(item => item.EventId == entity.Id).ToList();

            RepositoryDbContext.RemoveRange(dbUnit);
            var dbType = RepositoryDbContext.EventInTypes.Where(item => item.EventId == entity.Id).ToList();

            RepositoryDbContext.RemoveRange(dbType);
            return(EventMapper.MapFromDomain(RepositoryDbSet.Update(EventMapper.MapFromDAL(entity)).Entity));
        }