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

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

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

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

                var res = db.optionTypes.FirstOrDefault(e => e.optionTypeId == optionTypeId);

                if (res == null) return null;

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

                db.SaveChanges();
                return res;

            }
        }