public void SetUserRegistration(Guid userID, bool isRegistered)
        {
            pdc09_UserRegistration registration = context.pdc09_UserRegistrations.FirstOrDefault(ur => ur.UserID == userID);

            if (registration != null)
            {
                registration.LastCheckDate = DateTime.UtcNow;
                registration.IsRegistered  = isRegistered;
            }
            else
            {
                context.pdc09_UserRegistrations.InsertOnSubmit(
                    new pdc09_UserRegistration
                {
                    UserID        = userID,
                    IsRegistered  = isRegistered,
                    LastCheckDate = DateTime.UtcNow
                }
                    );
            }

            context.SubmitChanges();
        }
Exemplo n.º 2
0
 partial void Updatepdc09_UserRegistration(pdc09_UserRegistration instance);
Exemplo n.º 3
0
 partial void Deletepdc09_UserRegistration(pdc09_UserRegistration instance);
Exemplo n.º 4
0
 partial void Insertpdc09_UserRegistration(pdc09_UserRegistration instance);