public static IEnumerable <EmployeeDto> ConvertToDto(IEnumerable <Employee> list)
        {
            if (list == null)
            {
                return(new List <EmployeeDto>());
            }

            var res = from m in list
                      select new EmployeeDto
            {
                Id           = m.Id,
                StaffTypeId  = m.StaffTypeId,
                StoreId      = m.StoreId,
                FullName     = m.FullName,
                IdentityCard = m.IdentityCard,
                Nationality  = m.Nationality,
                Address      = m.Address,
                DateOfBirth  = m.DateOfBirth,
                Gender       = m.Gender,
                Phone        = m.Phone,
                Email        = m.Email,
                StaffType    = StaffTypeDto.ConvertToDto(m.StaffType),
                Nationality1 = NationalDto.ConvertToDto(m.Nationality1),
                Store        = StoreDto.ConvertToDto(m.Store)
            };

            return(res.ToList());
        }
        public static EmployeeDto ConvertToDto(Employee m)
        {
            if (m == null)
            {
                return(new EmployeeDto());
            }

            var res = new EmployeeDto
            {
                Id           = m.Id,
                StaffTypeId  = m.StaffTypeId,
                StoreId      = m.StoreId,
                FullName     = m.FullName,
                IdentityCard = m.IdentityCard,
                Nationality  = m.Nationality,
                Address      = m.Address,
                DateOfBirth  = m.DateOfBirth,
                Gender       = m.Gender,
                Phone        = m.Phone,
                Email        = m.Email,
                Nationality1 = NationalDto.ConvertToDto(m.Nationality1),
                StaffType    = StaffTypeDto.ConvertToDto(m.StaffType),
                Store        = StoreDto.ConvertToDto(m.Store),
                //Orders = OrderDto.ConvertToDto(m.Orders),
                //Users = UserDto.ConvertToDto(m.Users)
            };

            return(res);
        }
        public static Nationality ConvertToModel(NationalDto m)
        {
            if (m == null)
            {
                return(new Nationality());
            }

            var res = new Nationality
            {
                Id      = m.Id,
                Name    = m.Name,
                ZipCode = m.ZipCode
                          //Employees = EmployeeDto.ConvertToDto(m.Employees),
                          //Stores = StoreDto.ConvertToDto(m.Stores)
            };

            return(res);
        }