public EntityType Read(string name)
        {
            var entityType = new EntityType();
            using (SqlConnection sqlConnection = _connectionProvider.GetConnection())
            {
                using (SqlCommand sqlCommand = sqlConnection.CreateCommand())
                {
                    sqlCommand.CommandText = string.Format("SELECT * FROM hsck.EntityTypes WHERE Name='{0}'", name);
                    using (SqlDataReader reader = sqlCommand.ExecuteReader())
                    {
                        reader.Read();
                        entityType.Id = (int) reader["id"];
                        entityType.Name = (string) reader["Name"];
                    }
                }
            }

            entityType.AddAttributes(_sqlAttributeTypeRepository.Read(entityType, this));

            return entityType;
        }
        public List<EntityType> ReadAll()
        {
            var entityTypes = new List<EntityType>();
            using (SqlConnection sqlConnection = _connectionProvider.GetConnection())
            {
                using (SqlCommand sqlCommand = sqlConnection.CreateCommand())
                {
                    sqlCommand.CommandText = "SELECT * FROM hsck.EntityTypes";
                    using (SqlDataReader reader = sqlCommand.ExecuteReader())
                    {
                        while (reader.Read())
                        {
                            var entityType = new EntityType
                                                 {
                                                     Id = (int) reader["id"],
                                                     Name = (string) reader["Name"]
                                                 };
                            entityType.AddAttributes(_sqlAttributeTypeRepository.Read(entityType, this));
                            entityTypes.Add(entityType);
                        }
                    }
                }
            }

            return entityTypes;
        }