using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WindowsFormsApp1
{
    public class EsbEmployee : IemployeeService
    {

        private ZkContext context;

        public EsbEmployee(ZkContext context)
        {
            this.context = context;
        }


        public List<ResponEmployee> GetAllEmp()
        {
            var emp = context.Employees.ToList();

            List<ResponEmployee> results = new List<ResponEmployee>();



            foreach (var e in emp)
            {
                results.Add(new ResponEmployee()
                {

                    id = e.id,
                    name = e.name,
                    sername = e.sername,
                   
                });
            }

            return results;
        }
    }
}
