示例#1
0
 /// <summary>
 /// Update a registration.
 /// </summary>
 public Registration UpdateRegistration(Registration registration, RegistrationType type, DateTime timestamp, string name)
 {
     try
     {
         return Registration.UpdateRegistration(registration, type, timestamp, name);
     }
     catch (Exception ex)
     {
         this.logger.Error(ex);
         throw;
     }
 }
示例#2
0
        /// <summary>
        /// Update a registration.
        /// </summary>
        public static Registration UpdateRegistration(Registration registration, RegistrationType type, DateTime timestamp, string name)
        {
            registration.RegistrationType = type;
            registration.RegistrationTypeId = type.Id;
            registration.Name = name;
            registration.Updated = timestamp;

            return registration;
        }
示例#3
0
        /// <summary>
        /// Add registration to db set.
        /// </summary>
        public Registration AddRegistrationToDbSet(RegistrationType type, DateTime timestamp, string name, int originalWriteEventId)
        {
            try
            {
                var registration = Registration.CreateRegistration(type, timestamp, name, originalWriteEventId);

                this.readContext.Registrations.Add(registration);

                return registration;
            }
            catch (Exception ex)
            {
                this.logger.Error(ex);
                throw;
            }
        }
示例#4
0
 /// <summary>
 /// Create a registration object.
 /// </summary>
 public static Registration CreateRegistration(RegistrationType type, DateTime timestamp, string name, int originalWriteEventId)
 {
     return new Registration
     {
         RegistrationTypeId = type.Id,
         RegistrationType = type,
         Created = timestamp,
         Updated = timestamp,
         OriginalWriteEventId = originalWriteEventId,
         Name = name
     };
 }