示例#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));
        }