diff --git a/Repository-Layer.md b/Repository-Layer.md index 1d76d4b..0db63e3 100644 --- a/Repository-Layer.md +++ b/Repository-Layer.md @@ -124,15 +124,15 @@ Dictionary CompareState(TEntity newdata); Suppose we have two entities: `User` and `Topic`, and two repositories are defined in the domain class: ```csharp -var userRepository = fsql.GetGuidRepository(); -var topicRepository = fsql.GetGuidRepository(); +var userRepository = fsql.GetRepository(); +var topicRepository = fsql.GetRepository(); ``` In practice, we always worry about the data security of `topicRepository`, that is, it is possible to query or change the topic of other users. Therefore, we have made improvements in the v0.0.7 version, adding the filter lambda expression parameter. ```csharp -var userRepository = fsql.GetGuidRepository(a => a.Id == 1); -var topicRepository = fsql.GetGuidRepository(a => a.UserId == 1); +var userRepository = fsql.GetRepository(a => a.Id == 1); +var topicRepository = fsql.GetRepository(a => a.UserId == 1); ``` * Attach this condition when querying/modifying/deleting, so that the data of other users will not be modified.