Exemple #1
0
        public async Task <IEnumerable <Product> > GetByNameAsync(string name)
        {
            if (string.IsNullOrEmpty(name) || string.IsNullOrWhiteSpace(name))
            {
                Notify("Informe o nome a consultar");
                return(null);
            }

            try
            {
                return(await _repositoryProduct.GetByNameAsync(name));
            }
            catch (Exception)
            {
                Notify("Falha ao obter os produtos por nome.");
            }
            return(null);
        }