using Karsha_Site.Application.Interfaces.Contexts; using Karsha_Site.Application.Services.Costomers.Queries.GetCustomers; using Karsha_Site.Common.Dto; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Karsha_Site.Application.Services.Common.Queries.GetCustomer { public interface IGetCustomerService { ResultDto> Execute(); } public class GetCustomerService : IGetCustomerService { private readonly IDataBaseContext _context; public GetCustomerService(IDataBaseContext context) { _context = context; } public ResultDto> Execute() { var customers = _context.Customers .ToList() .Select(p => new GetAboutAddressDto { ID = p.ID, FullName = p.FullName, Image = p.Image, Link = p.Link, }).ToList(); return new ResultDto>() { Data = customers, IsSuccess = true, }; } } }