internal DbvWebResponse(DbvItem item) { _contentType = MimeTypeFrom(item.Content, "text/plain"); _responseStream = new MemoryStream(item.Content); _headerCollection = new WebHeaderCollection(); _headerCollection.Add("X-DBV-Name", item.Name); _headerCollection.Add("X-DBV-Revision", item.Revision.ToString()); _headerCollection.Add("X-DBV-Timestamp", item.Timestamp.ToUniversalTime().ToString("R")); _headerCollection.Add("X-DBV-Comments", item.Comments); _headerCollection.Add("X-DBV-Author", item.Author); }
public int Checkin(DbvItem item) { //var connection = _connectionFactory.GetConnection(); try { //connection.Open(); var revision = SqlMapper.ExecuteScalar(_connectionFactory.GetConnection(),_insertQuery, item, _connectionFactory.GetTransaction()); return (int) revision; } finally { /* if (connection != null && connection.State == ConnectionState.Open) connection.Close(); */ } }
public int Checkin(DbvItem item) { //var connection = _connectionFactory.GetConnection(); try { //connection.Open(); var revision = SqlMapper.ExecuteScalar(_connectionFactory.GetConnection(), _insertQuery, item, _connectionFactory.GetTransaction()); return((int)revision); } finally { /* * if (connection != null && connection.State == ConnectionState.Open) * connection.Close(); */ } }
internal DbvWebResponse(DbvItem item) { _contentType = MimeTypeFrom(item.Content, "text/plain"); _responseStream = new MemoryStream(item.Content); _headerCollection = new WebHeaderCollection(); _headerCollection.Add("X-DBV-Name", item.Name); _headerCollection.Add("X-DBV-Revision", item.Revision.ToString()); _headerCollection.Add("X-DBV-Timestamp", item.Timestamp.ToUniversalTime().ToString("R")); _headerCollection.Add("X-DBV-Comments", item.Comments); _headerCollection.Add("X-DBV-Author", item.Author); }