public static Category mapModel(Category oldCategory, Category newCategory) { if (!CategoryValidator.validateCategory(newCategory)) { return(null); } oldCategory.IDCategory = newCategory.IDCategory; oldCategory.Name = newCategory.Name; oldCategory.Description = newCategory.Description; return(oldCategory); }