public IList <Company_Model> GetId(Company_Model model)
        {
            IList <Company_Model> result = new List <Company_Model>();

            result = Connect_Enttity.Companies.Where(x => x.id == model.id).Select(x => new Company_Model
            {
                id          = x.id,
                Name        = x.Name,
                Address     = x.Address,
                PhoneNumber = x.PhoneNumber,
                Fax         = x.Fax,
                ProvinceId  = (int)(x.ProvinceId),
                NameEn      = x.NameEn,
                AddressEn   = x.AddressEn
            }).ToList();

            return(result);
        }
        public void Update(Company_Model model)
        {
            var data = Connect_Enttity.Companies.FirstOrDefault(x => x.id == model.id);

            if (data != null)
            {
                data.Name        = model.Name;
                data.Address     = model.Address;
                data.PhoneNumber = model.PhoneNumber;
                data.Fax         = model.Fax;
                data.ProvinceId  = (int)(model.ProvinceId);
                data.NameEn      = model.NameEn;
                data.AddressEn   = model.AddressEn;

                Connect_Enttity.SaveChanges();
                Dispose();
            }
        }