示例#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});
        }
示例#2
0
 private void detach_comentarios(comentario entity)
 {
     this.SendPropertyChanging();
     entity.usuario = null;
 }
示例#3
0
 partial void Deletecomentario(comentario instance);
示例#4
0
 private void attach_comentarios(comentario entity)
 {
     this.SendPropertyChanging();
     entity.usuario = this;
 }
示例#5
0
 partial void Insertcomentario(comentario instance);
示例#6
0
 partial void Updatecomentario(comentario instance);
示例#7
0
		private void detach_comentarios(comentario entity)
		{
			this.SendPropertyChanging();
			entity.usuario = null;
		}
示例#8
0
		private void attach_comentarios(comentario entity)
		{
			this.SendPropertyChanging();
			entity.usuario = this;
		}
示例#9
0
 partial void Deletecomentario(comentario instance);
示例#10
0
 partial void Updatecomentario(comentario instance);
示例#11
0
 partial void Insertcomentario(comentario instance);