Skip to content

Commit

Permalink
Updated events docs as all events need "Entity" on the end of the name
Browse files Browse the repository at this point in the history
  • Loading branch information
mattbrailsford committed Jun 19, 2018
1 parent f041568 commit ea68992
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions docs/_pages/02-api-11-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ Fluidity fires a number of standard .NET events during regular operation to allo

### Repository events

#### Saving(object sender, SavingEntityEventArgs args)
#### SavingEntity(object sender, SavingEntityEventArgs args)
{: .signature}

Raised when the repository `Save` method is called and before the entity has been saved. The `args` param contains an `Entity` property with `Before` and `After` inner properties providing access to a copy of the currently persisted entity (or null if a new entity) and the updated entity about to be saved. Changes can be made to the `After` entity and they will be persisted as part of the save opperation. If the `Cancel` property of `args` is set to `true` then the save operation will be canceled and no changes will be saved.

````csharp
// Example
Fluidity.Saving += (sender, args) => {
Fluidity.SavingEntity += (sender, args) => {
var person = args.Entity.After as Person;
if (person != null){
...
Expand All @@ -27,14 +27,14 @@ Fluidity.Saving += (sender, args) => {
---


#### Saved(object sender, SavedEntityEventArgs args)
#### SavedEntity(object sender, SavedEntityEventArgs args)
{: .signature}

Raised when the repository `Save` method is called and after the entity has been saved. The `args` param contains an `Entity` property with `Before` and `After` inner properties providing access to a copy of the previously persisted entity (or null if a new entity) and the updated entity just saved.

````csharp
// Example
Fluidity.Saved += (sender, args) => {
Fluidity.SavedEntity += (sender, args) => {
var person = args.Entity.After as Person;
if (person != null){
...
Expand All @@ -45,14 +45,14 @@ Fluidity.Saved += (sender, args) => {
---


#### Deleting(object sender, DeletingEntityEventArgs args)
#### DeletingEntity(object sender, DeletingEntityEventArgs args)
{: .signature}

Raised when the repository `Delete` method is called and before the entity is deleted. The `args` param contains an `Entity` property providing access to a copy of the entity about to be deleted. If the `Cancel` property of `args` is set to `true` then the delete operation will be canceled and entity won't be deleted.

````csharp
// Example
Fluidity.Deleting += (sender, args) => {
Fluidity.DeletingEntity += (sender, args) => {
var person = args.Entity as Person;
if (person != null){
...
Expand All @@ -62,14 +62,14 @@ Fluidity.Deleting += (sender, args) => {

---

#### Deleted(object sender, DeletedEntityEventArgs args)
#### DeletedEntity(object sender, DeletedEntityEventArgs args)
{: .signature}

Raised when the repository `Delete` method is called and after the entity has been deleted. The `args` param contains an `Entity` property providing access to a copy of the entity just deleted.

````csharp
// Example
Fluidity.Deleted += (sender, args) => {
Fluidity.DeletedEntity += (sender, args) => {
var person = args.Entity as Person;
if (person != null){
...
Expand Down

0 comments on commit ea68992

Please sign in to comment.