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

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

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

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

                var res = db.listingStatusTypes.FirstOrDefault(e => e.listingStatusTypeId == listingStatusTypeId);

                if (res == null) return null;

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

                db.SaveChanges();
                return res;

            }
        }