private void detach_Aprobaciones(Aprobacione entity) { this.SendPropertyChanging(); entity.Usuario = null; }
partial void DeleteAprobacione(Aprobacione instance);
private void attach_Aprobaciones(Aprobacione entity) { this.SendPropertyChanging(); entity.Recurso = this; }
partial void UpdateAprobacione(Aprobacione instance);
partial void InsertAprobacione(Aprobacione instance);
// likes a resource. public void likeResource(Recurso resource) { // create a likeResource Aprobacione likeResource = new Aprobacione(); likeResource.idRecurso = resource.id; likeResource.idUsuario = UserInfo.Id; // add likeResource to the database. try { IndignadoDBDataContext indignadoContext = new IndignadoDBDataContext(); indignadoContext.Aprobaciones.InsertOnSubmit(likeResource); indignadoContext.SubmitChanges(); } catch (Exception error) { } }