I have a mssql database for my website within 4 tables.
When I use this:
public static string GetAllEventsForJSON()
{
using (CyberDBDataContext d
Sometimes you have loops becouse your type class have references to other classes and that classes have references to your type class, thus you have to select the parameters that you need exactly in the json string, like this code.
List oficinas = new List();
oficinas = /*list content*/;
var x = JsonConvert.SerializeObject(oficinas.Select(o => new
{
o.IdOficina,
o.Nombre
}));