partial void Deleteperfilusers(perfilusers instance);
public void regperfilusers(perfilext model,Guid idUsers) { DataClasses1DataContext db = new DataClasses1DataContext(); perfilusers users = new perfilusers() { nombre=model.Nombre, apellido=model.Apellido, avatar=model.Avatar, ubicacion=model.Ubicacion, interes=model.Interes, UserId=idUsers }; db.perfilusers.InsertOnSubmit(users); db.SubmitChanges(); }
partial void Updateperfilusers(perfilusers instance);
partial void Insertperfilusers(perfilusers instance);
private void detach_perfilusers(perfilusers entity) { this.SendPropertyChanging(); entity.aspnet_Users = null; }
public ActionResult libro(string buscarr,buscar model) { DataClasses1DataContext db = new DataClasses1DataContext(); //publicacion pe = new publicacion(); perfilusers u = new perfilusers(); categoria c = new categoria(); categorizacion cat = new categorizacion(); var pe = (from b in db.publicacion join l in db.libro on b.idPublicacion equals l.idPublicacion where b.idPublicacion == l.idPublicacion && b.titulo == buscarr && b.correcciones=="true" select b).ToList(); if (pe != null) { var lib = (from l in db.publicacion where l.titulo == buscarr select l).ToArray()[0]; ViewBag.p = (from l in db.publicacion where l.titulo == buscarr select l).ToList(); ViewBag.u = (from s in db.perfilusers where s.UserId == lib.UserId select s).ToList(); model.idPublicacion = (int)lib.idPublicacion; model.UserId = lib.UserId; comentario co = new comentario(); try { co = (from m in db.comentario where m.titulo == buscarr select m).ToArray()[0]; // if (co != null) //{ ViewBag.comentario = from m in db.comentario where m.titulo == buscarr select m; } catch (Exception) { ViewBag.comentario2 = "Contenido sin comentarios"; } } else { ViewBag.error = "Sin contenido"; } return View(); //return View(); }
public ActionResult libro() { DataClasses1DataContext db = new DataClasses1DataContext(); publicacion pe = new publicacion(); perfilusers u = new perfilusers(); categoria c = new categoria(); categorizacion cat = new categorizacion(); pe = (from b in db.publicacion select b).ToArray()[0]; //ViewBag.p = from b in db.publicacion select b; //ViewBag.u = from s in db.perfilusers select s; ViewBag.p = null; return View(); }