Exemplo n.º 1
0
        public Result Return()
        {
            var result = Result.Ok;

            if (_notifications.HasNotificationsWithKey("Error"))
            {
                result = Result.Error;
            }
            result.AddMessages(_notifications.GetNotifications());
            return(result);
        }
Exemplo n.º 2
0
        public async Task <Result> Return()
        {
            var result = Result.Ok;

            if (_notifications.HasNotificationsWithKey("Error"))
            {
                result = Result.Error;
            }
            result.AddMessages(_notifications.GetNotifications());
            return(await Task.FromResult(result));
        }