예제 #1
0
        /// <summary>
        /// Persiste el elemento.
        /// </summary>
        /// <param name="map"></param>
        /// <returns></returns>
        public bool Save(Map map)
        {
            if (!IsValid(map))
            {
                return(false);
            }

            MapMapper mapMapper = new MapMapper();

            if (!mapMapper.Save(map))
            {
                string errorDescription = "No se ha podido guardar el mapa.";
                log.AddLogCritical("Save", errorDescription, this);
                AddError(new ResultBE(ResultBE.Type.FAIL, errorDescription));
                return(false);
            }

            return(true);
        }