public bool registrarLog(Guid UniqueIdentifierUser, String Pagina) { int idOperacion = 0; using (AccesoDatosDataContext ctx = new AccesoDatosDataContext(ConfigurationManager.ConnectionStrings["UniandesConnectionString"].ConnectionString)) { var paginas = (from d in ctx.OPERACION where d.URL.Contains(Pagina) select d).Distinct(); if (paginas.Any()) { idOperacion = paginas.First().ID_OPERACION; } Activity act = new Activity(); act.ActivityDay = DateTime.Now; act.Id_Operacion = idOperacion; act.UserId = UniqueIdentifierUser; ctx.Activity.InsertOnSubmit(act); ctx.SubmitChanges(); } return true; }
partial void UpdateActivity(Activity instance);
partial void DeleteActivity(Activity instance);
partial void InsertActivity(Activity instance);