Example #1
0
    public List<EntityVO> getAll()
    {
        FVSL_LINQDataContext dbcon = new FVSL_LINQDataContext();

        List<EntityVO> lista = new List<EntityVO>();

        try
        {
            List<MAPA_GET_Proyecto_ALLResult> resulset = dbcon.MAPA_GET_Proyecto_ALL().ToList();

            foreach (MAPA_GET_Proyecto_ALLResult proyectos in resulset)
            {
                EntityVO EVO = new EntityVO();

                EVO.id = proyectos.Id.ToString();
                EVO.name = proyectos.Nombre;
                EVO.latitude = proyectos.latitud;
                EVO.longitude = proyectos.longitud;

                lista.Add(EVO);
            }

            return lista;
        }
        catch (Exception e)
        {
            Logging.WriteError(e.StackTrace.ToString());
            return null;
        }
    }