protected void Page_Load(object sender, EventArgs e)
        {
            NSAADMEntities n;

            ConstruirEF cf = new ConstruirEF();
            n = (NSAADMEntities)cf.RecuperaEntity(Entities.MercadoLivre);

            //*****************************************
            Request.InputStream.Position = 0;
            System.IO.StreamReader str = new System.IO.StreamReader(Request.InputStream);

            CallBackTemp c = new CallBackTemp();
            c = JsonConvert.DeserializeObject<CallBackTemp>(str.ReadToEnd());
            //*****************************************

            try
            {
                CallBackML teste = (from p in n.CallBackMLs where p.resource == c.resource select p).First();

            }
            catch (Exception)
            {

                CallBackML call = new CallBackML();
                call.received = c.received;
                call.resource = c.resource;
                call.sent = c.sent;
                call.topic = c.topic;
                call.userID = c.user_id;

                n.CallBackMLs.AddObject(call);

                n.SaveChanges();

                if (c.topic == "questions")
                {
                    ControlaMeli cm = new ControlaMeli();

                    ControlaPerguntas cp = new ControlaPerguntas();

                    cp.GravaPergunta(cm.RetonarQuestion(c.resource), cm.n);
                }
                if (c.topic == "orders")
                {
                    ControlaMeli cm = new ControlaMeli();
                    ControlaOrdens co = new ControlaOrdens();
                    ConverterObjetoMLparaEF conv = new ConverterObjetoMLparaEF();
                    co.GravaOrdem(cm.RetornaOrder(c.resource),cm.n);

                }
            }
        }
 /// <summary>
 /// Create a new CallBackML object.
 /// </summary>
 /// <param name="id">Initial value of the id property.</param>
 public static CallBackML CreateCallBackML(global::System.Decimal id)
 {
     CallBackML callBackML = new CallBackML();
     callBackML.id = id;
     return callBackML;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the CallBackMLs EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToCallBackMLs(CallBackML callBackML)
 {
     base.AddObject("CallBackMLs", callBackML);
 }