/* ---------------------------------------------------------------------*/ public void eliminartabla() { if (db.toptens.Count() > 0) { IEnumerable<topten> lista = (from aux in db.toptens select new topten { id = aux.id, idusuario = aux.idusuario, puntosportorneo = aux.puntosportorneo, } ); foreach (var aux in lista) { MvcApplication6.Models.topten M = new topten { id = aux.id, idusuario = aux.idusuario, puntosportorneo = aux.puntosportorneo, }; db.toptens.Attach(M); db.toptens.DeleteOnSubmit(M); db.SubmitChanges(); } } }
/* ---------------------------------------------------------------------*/ /* ---------------------------------------------------------------------*/ public void insertarpuntos( IEnumerable<boletamodels> lboletas ) { foreach (var auxb in lboletas) { topten P = new topten(); P.idusuario = auxb.idusuario; P.puntosportorneo = auxb.puntostotales; db.toptens.InsertOnSubmit(P); db.SubmitChanges(); } }
private void detach_toptens(topten entity) { this.SendPropertyChanging(); entity.usuario = null; }
private void attach_toptens(topten entity) { this.SendPropertyChanging(); entity.usuario = this; }
partial void Deletetopten(topten instance);
partial void Updatetopten(topten instance);
partial void Inserttopten(topten instance);