Esempio n. 1
0
        public CategoryVM Add(int typeProductId, CategoryVM newObject)
        {
            if (typeProductId <= 0 || newObject == null)
            {
                return(null);
            }
            var newCate = _mapper.Map <Category>(newObject);

            newCate.TypeProductId = typeProductId;
            return(_mapper.Map <CategoryVM>(_cateDAO.AddItem(newCate)));
        }