public void ApplayModel(Item item, ItemEditModel model)
        {
            if (model == null)
            {
                return;
            }

            item.Name     = model.Name;
            item.Category = model.Category;
            item.Code     = model.Code;
        }
        public ItemEditModel ToModel(Item item)
        {
            if (item == null)
            {
                return(new ItemEditModel());
            }

            ItemEditModel model = new ItemEditModel();

            model.Id       = item.Id;
            model.Name     = item.Name;
            model.Category = item.Category;
            model.Code     = item.Code;
            return(model);
        }