diff options
| author | Syndamia <kamen.d.mladenov@protonmail.com> | 2021-05-12 14:39:24 +0300 |
|---|---|---|
| committer | Syndamia <kamen.d.mladenov@protonmail.com> | 2021-05-12 14:39:24 +0300 |
| commit | a2b4dc764a3bab0756803c992873ae6ece621f0f (patch) | |
| tree | 05d6db9c81c792cbb5b12745e4bf4c3676e51d7f | |
| parent | 09735e6103ec19d1dab05888e890e450c594c36f (diff) | |
| download | it-kariera-exam-template-a2b4dc764a3bab0756803c992873ae6ece621f0f.tar it-kariera-exam-template-a2b4dc764a3bab0756803c992873ae6ece621f0f.tar.gz it-kariera-exam-template-a2b4dc764a3bab0756803c992873ae6ece621f0f.zip | |
Add feature template script now adds a GetAll method in service (although web doesn't handle it in any way)
| -rwxr-xr-x | tools/add-feature-template.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/add-feature-template.sh b/tools/add-feature-template.sh index edce00d..a85cb7a 100755 --- a/tools/add-feature-template.sh +++ b/tools/add-feature-template.sh @@ -105,6 +105,13 @@ namespace $project_name.Services return this._autoMapper.Map<${feature_name}ServiceModel>(curr$feature_name); } + public List<${feature_name}ServiceModel> GetAll() + { + return this._context.${feature_name}s + .Select(x => this._autoMapper.Map<${feature_name}ServiceModel>(x)) + .ToList(); + } + public async Task<bool> EditAsync(Edit${feature_name}ServiceModel edit${feature_name}ServiceModel) { $feature_name curr$feature_name = this._autoMapper.Map<$feature_name>(edit${feature_name}ServiceModel); |
