Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
RodrigoBernardino authored Jan 8, 2018
1 parent ed10f39 commit f21b8ce
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,12 @@ var usersWithManager = repository.FindAllIncludingNestedProps(queryLimits, claus
### Write Methods

All the returned entities are encapsulated in a **Maybe** class to avoid null reference errors.

You can add a new entity with or without nested entity properties.
```C#
var user = new User();
var newUser = repository.Add(user); //without adding nested entity properties
var newUser = repository.AddWithNestedProperties(user); //with adding nested entity properties
var newUser = repository.AddWithNestedProperties(user); //adding nested entity properties
if(newUser.Any()) {
return newUser.Single();
}
Expand All @@ -84,7 +85,7 @@ repository.RemoveRange(clauses);

You can update an entity or a range of entities.
```C#
var updatedUser = repository.Update(user);
repository.UpdateRange(users);
var updatedUser = repository.Update(newUser);
repository.UpdateRange(newUsers);
```

0 comments on commit f21b8ce

Please sign in to comment.