Exemple #1
0
        public JsonResult publicarcomentarios(comentario cc)
        {
            cc.fecha = DateTime.Now;
            cc.idUs = 1;

            ConectorDataContext db = new ConectorDataContext();
            db.comentarios.InsertOnSubmit(cc);
            db.SubmitChanges();
            rendercomentario obj = new rendercomentario()
            {
                nickname=db.usuarios.Where(a=>a.id==cc.idUs).First().nickname,
                content=cc.content,
                fecha=cc.fecha.ToShortTimeString(),
                email = db.usuarios.Where(a => a.id == cc.idUs).First().email
            };
            return Json(new {data=obj});
        }
Exemple #2
0
 private void detach_comentarios(comentario entity)
 {
     this.SendPropertyChanging();
     entity.usuario = null;
 }
Exemple #3
0
 partial void Deletecomentario(comentario instance);
Exemple #4
0
 private void attach_comentarios(comentario entity)
 {
     this.SendPropertyChanging();
     entity.usuario = this;
 }
Exemple #5
0
 partial void Insertcomentario(comentario instance);
Exemple #6
0
 partial void Updatecomentario(comentario instance);
Exemple #7
0
		private void detach_comentarios(comentario entity)
		{
			this.SendPropertyChanging();
			entity.usuario = null;
		}
Exemple #8
0
		private void attach_comentarios(comentario entity)
		{
			this.SendPropertyChanging();
			entity.usuario = this;
		}
Exemple #9
0
 partial void Deletecomentario(comentario instance);
Exemple #10
0
 partial void Updatecomentario(comentario instance);
Exemple #11
0
 partial void Insertcomentario(comentario instance);