forked from ravendb/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Fitzchak Yitzchaki
committed
Dec 5, 2017
1 parent
8029c01
commit e4f51ac
Showing
7 changed files
with
55 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 0 additions & 22 deletions
22
...-api/session/attachments/how-to/update-attachment-metadata-only.dotnet.markdown
This file was deleted.
Oops, something went wrong.
17 changes: 7 additions & 10 deletions
17
....0/Raven.Documentation.Pages/client-api/session/attachments/put.dotnet.markdown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,21 @@ | ||
# Attachments : Put | ||
|
||
**PutAttachment** is used to insert or update an attachment in a database. | ||
In order to put an attachment in RavenDB you need to create a document and than you can attach an attachment to the document using the `Advanced.Attachments.Store` method. | ||
Note that attachments are trnsactional and would be save when you call `session.SaveChanges`. | ||
|
||
## Syntax | ||
|
||
{CODE put_1@ClientApi\Commands\Attachments\Put.cs /} | ||
The can store an attachment using the folloinwg `session.Advanced.Attachments.Store` methods: | ||
|
||
| Parameters | | | | ||
| ------------- | ------------- | ----- | | ||
| **key** | string | unique key under which attachment will be stored | | ||
| **etag** | Etag | current attachment etag, used for concurrency checks (`null` to skip check) | | ||
| **data** | Stream | attachment data | | ||
| **metadata** | RavenJObject | attachment metadata | | ||
{CODE StoreSyntax@ClientApi\Session\Attachments.cs /} | ||
|
||
## Example | ||
|
||
{CODE put_2@ClientApi\Commands\Attachments\Put.cs /} | ||
{CODE StoreAttachment@ClientApi\Session\Attachments.cs /} | ||
|
||
{CODE StoreAttachmentAsync@ClientApi\Session\Attachments.cs /} | ||
|
||
## Related articles | ||
|
||
- [How to **update** attachment **metadata** only?](../../../client-api/commands/attachments/how-to/update-attachment-metadata-only) | ||
- [GetAttachment](../../../client-api/commands/attachments/get) | ||
- [DeleteAttachment](../../../client-api/commands/attachments/delete |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 0 additions & 32 deletions
32
.../Samples/csharp/Raven.Documentation.Samples/ClientApi/Session/Attachments/HowTo/Update.cs
This file was deleted.
Oops, something went wrong.