public async Task <IActionResult> Post(CreateSnackDTO obj)
        {
            List <string> errorList = new List <string>();
            var           newSnack  = new SnackModel()
            {
                snackName     = obj.name,
                snackPrice    = obj.price,
                snackQuantity = obj.quantity,
            };

            var result = _entityToValidate.Validate(newSnack);

            if (!result.IsValid)
            {
                foreach (var error in result.Errors)
                {
                    errorList.Add(error.ToString());
                }
                return(BadRequest(errorList));
            }
            await _repoSnack.CreateSnack(newSnack);

            return(Ok());
        }