/// <summary>
        /// Creates a new Version Info entity.
        /// </summary>
        /// <param name="component">The name of the component.</param>
        /// <param name="version">The version of the component.</param>
        /// <returns>A <see cref="ManagerResponse"/> object.</returns>
        public ManagerResponse Add(string component, string version)
        {
            // Validate parameters
            if (String.IsNullOrWhiteSpace(component))
            {
                return ManagerResponse.InvalidData;
            }

            if (String.IsNullOrWhiteSpace(version))
            {
                return ManagerResponse.InvalidData;
            }

            var sqlScriptVersionInfo = new SqlScriptVersionInfo()
            {
                Component = component,
                Version = version,
            };

            ManagerResponse response;

            using (var context = new Entities(_connectionString))
            {
                context.SqlScriptVersionInfos.AddObject(sqlScriptVersionInfo as SqlScriptVersionInfo);
                response = context.SaveChanges() == 1 ? ManagerResponse.Success : ManagerResponse.UnknownFailure;
            }

            return response;
        }
        /// <summary>
        /// Reads the entire list of <see cref="IVersionInfo"/>s.
        /// </summary>
        /// <returns>An <see cref="IEnumerable{T}"/> list of <see cref="IVersionInfo"/>s.</returns>
        public IEnumerable<IVersionInfo> ReadList()
        {
            using (var context = new Entities(_connectionString))
            {
                var query = from s in context.SqlScriptVersionInfos orderby s.Component select s;

                var list = query.ToList().AsReadOnly();
                var results = list.Cast<IVersionInfo>();
                return results;
            }
        }
        /// <summary>
        /// Updates the specified <see cref="IVersionInfo"/> entity.
        /// </summary>
        /// <param name="versionInfo">The <see cref="IVersionInfo"/> entity to update.</param>
        /// <returns>A <see cref="ManagerResponse"/> object.</returns>
        public ManagerResponse Update(IVersionInfo versionInfo)
        {
            // Validate parameters
            if (versionInfo == null)
            {
                return ManagerResponse.MissingData;
            }

            if (String.IsNullOrWhiteSpace(versionInfo.Component))
            {
                return ManagerResponse.InvalidData;
            }

            if (String.IsNullOrWhiteSpace(versionInfo.Version))
            {
                return ManagerResponse.InvalidData;
            }

            ManagerResponse response;

            using (var context = new Entities(_connectionString))
            {
                context.SqlScriptVersionInfos.Attach(versionInfo as SqlScriptVersionInfo);
                context.ObjectStateManager.ChangeObjectState(versionInfo, EntityState.Modified);
                response = context.SaveChanges() == 1 ? ManagerResponse.Success : ManagerResponse.UnknownFailure;
            }

            return response;
        }
 /// <summary>
 /// Returns a <see cref="IVersionInfo"/> for the specified component name.
 /// </summary>
 /// <param name="component">The component.</param>
 /// <returns>
 /// An implementation of the <see cref="IVersionInfo"/> interface.
 /// </returns>
 public IVersionInfo Read(string component)
 {
     using (var context = new Entities(_connectionString))
     {
         return context.SqlScriptVersionInfos.SingleOrDefault(s => s.Component == component);
     }
 }