From 473132d66ad7da2d98b30778ee40a7a39ae6f99c Mon Sep 17 00:00:00 2001 From: MahanCh Date: Wed, 6 Aug 2025 09:55:33 +0330 Subject: [PATCH] change Representative selectList --- .../GetSelectListRepresentativeViewModel.cs | 17 ++++------------- .../Repository/RepresentativeRepository.cs | 2 +- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/CompanyManagment.App.Contracts/Representative/GetSelectListRepresentativeViewModel.cs b/CompanyManagment.App.Contracts/Representative/GetSelectListRepresentativeViewModel.cs index 5129d8d0..6a4fbfd9 100644 --- a/CompanyManagment.App.Contracts/Representative/GetSelectListRepresentativeViewModel.cs +++ b/CompanyManagment.App.Contracts/Representative/GetSelectListRepresentativeViewModel.cs @@ -1,17 +1,8 @@ -namespace CompanyManagment.App.Contracts.Representative; +using _0_Framework.Application; + +namespace CompanyManagment.App.Contracts.Representative; /// /// ویو مدل سلکت لیست برای معرف /// -public class GetSelectListRepresentativeViewModel -{ - /// - /// آیدی - /// - public long Id { get; set; } - - /// - /// نام معرف - /// - public string Name { get; set; } -} \ No newline at end of file +public class GetSelectListRepresentativeViewModel:SelectListViewModel; \ No newline at end of file diff --git a/CompanyManagment.EFCore/Repository/RepresentativeRepository.cs b/CompanyManagment.EFCore/Repository/RepresentativeRepository.cs index 8179f39d..f2b1953e 100644 --- a/CompanyManagment.EFCore/Repository/RepresentativeRepository.cs +++ b/CompanyManagment.EFCore/Repository/RepresentativeRepository.cs @@ -289,7 +289,7 @@ public class RepresentativeRepository : RepositoryBase, IR return await _context.RepresentativeSet.Select(x => new GetSelectListRepresentativeViewModel() { Id = x.id, - Name = x.FullName + Text = x.FullName }).ToListAsync(); }