예제 #1
0
        public Result Return()
        {
            var result = Result.Ok;

            if (_notifications.HasNotificationsWithKey("Error"))
            {
                result = Result.Error;
            }
            result.AddMessages(_notifications.GetNotifications());
            return(result);
        }
예제 #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));
        }