예제 #1
0
        public async Task <IdentityResult> UpdateAsync(T model,
                                                       CancellationToken cancellationToken,
                                                       SqlTransaction transaction = null)
        {
            using (var connection = _connectionService.Create())
            {
                var result = await _databaseActions
                             .Update <T>(connection, model, cancellationToken);

                return(await Task.FromResult(result > 0
                                             ?IdentityResult.Success
                                             : IdentityResult.SubmitFailed($"خطایی در ثبت اطلاعات بوجود آمد است.")));;
            }
        }