public long getNext(Int64 id)
{
try
{
var query = from c in entities.centros
where id == c.id
select c.siguiente_expediente;
return Convert.ToInt64(query.FirstOrDefault());
}
catch (Exception err)
{
throw new Exception(err.ToString() + "--centros.cs / GetNext(Int64)");
}
}