public CountryTypeVo insert(CountryTypeVo input)
        {
            using (var db = new MainDb())
            {

                db.countryTypes.Add(input);
                db.SaveChanges();

                return input;
            }
        }
        public CountryTypeVo update(CountryTypeVo input, int? countryTypeId= null)
        {
            using (var db = new MainDb())
            {

                if (countryTypeId == null)
                    countryTypeId = input.countryTypeId;

                var res = db.countryTypes.FirstOrDefault(e => e.countryTypeId == countryTypeId);

                if (res == null) return null;

                input.created = res.created;
               // input.createdBy = res.createdBy;
                db.Entry(res).CurrentValues.SetValues(input);

                db.SaveChanges();
                return res;

            }
        }