disable MongoDB transactions to see if that works.
do it in the ConfigureServices
method of your Module class
Configure<AbpUnitOfWorkDefaultOptions>(options =>
{
options.TransactionBehavior = UnitOfWorkTransactionBehavior.Disabled;
});
hi, we use EF Core, so sure you can have many to many relationship. This is not directly related to ABP but EF Core. See https://docs.microsoft.com/en-us/ef/core/modeling/relationships?tabs=fluent-api,fluent-api-simple-key,simple-key#many-to-many
hi,
you can see Event Bus system. By Event Bus, you can register to your card insert event and the subscriber class can send the data to the client via SignalR.
and I can share a sample code to init SignalR connection in the Angular side
import * as signalR from '@microsoft/signalr';
private initSignalR(currentUser: ApplicationConfiguration.CurrentUser) {
if (this.conectedUserId === currentUser.id) return;
if (this.connection) this.connection.stop();
this.connection = new signalR.HubConnectionBuilder()
.withUrl(`${this.signalRUrl}/signalr-hubs/chat`, {
accessTokenFactory: () => this.oAuthService.getAccessToken(),
})
.build();
this.connection.on('ReceiveMessage', this.handleMessage);
this.connection
.start()
.then(() => {
this.conectedUserId = currentUser.id;
})
.catch((err) => {
return console.error(err.toString());
});
}
Also see the usage from https://www.npmjs.com/package/@microsoft/signalr
Check out https://docs.abp.io/en/abp/latest/Object-Extensions
In this document an extra field SocialSecurityNumber
is being added to IdentityUser
entity.
Hi,
Use the below service to fetch the texts, Now you can fetch without any permission.
public class MyLanguageAppService : LanguageAppServiceBase, IApplicationService
{
protected ILanguageTextRepository LanguageTextRepository { get; }
protected IStringLocalizerFactory LocalizerFactory { get; }
protected AbpLocalizationOptions AbpLocalizationOptions { get; }
public MyLanguageAppService(
ILanguageTextRepository languageTextRepository,
IOptions<AbpLocalizationOptions> abpLocalizationOptions,
IStringLocalizerFactory localizerFactory)
{
LanguageTextRepository = languageTextRepository;
LocalizerFactory = localizerFactory;
AbpLocalizationOptions = abpLocalizationOptions.Value;
}
public Task<PagedResultDto<LanguageTextDto>> GetListAsync(GetLanguagesTextsInput input)
{
var languageTexts = new List<LanguageTextDto>();
foreach (var resourceName in GetResourceNames(input))
{
languageTexts.AddRange(GetLocalizationsFromResource(input, resourceName));
}
var filteredQuery = languageTexts
.AsQueryable()
.WhereIf(
!input.Filter.IsNullOrWhiteSpace(),
l =>
(l.Name != null && l.Name.IndexOf(input.Filter, StringComparison.OrdinalIgnoreCase) >= 0) ||
(l.BaseValue != null && l.BaseValue.IndexOf(input.Filter, StringComparison.OrdinalIgnoreCase) >= 0) ||
(!input.GetOnlyEmptyValues && l.Value != null && l.Value.IndexOf(input.Filter, StringComparison.InvariantCultureIgnoreCase) >= 0)
);
var languagesTextDtos = filteredQuery
.OrderBy(input.Sorting ?? $"{nameof(LanguageTextDto.Name)} ASC")
.PageBy(input)
.ToList();
return Task.FromResult(new PagedResultDto<LanguageTextDto>(
filteredQuery.Count(),
languagesTextDtos
));
}
protected List<string> GetResourceNames(GetLanguagesTextsInput input)
{
var resourceNames = new List<string>();
if (string.IsNullOrWhiteSpace(input.ResourceName))
{
resourceNames.AddRange(
AbpLocalizationOptions
.Resources
.Values
.Select(l => l.ResourceName)
);
}
else
{
resourceNames.Add(input.ResourceName);
}
return resourceNames;
}
protected virtual List<LanguageTextDto> GetLocalizationsFromResource(
GetLanguagesTextsInput input,
string resourceName)
{
var localizer = GetLocalizer(resourceName);
List<LocalizedString> baseLocalizedStrings;
List<LocalizedString> targetLocalizedStrings;
using (CultureHelper.Use(CultureInfo.GetCultureInfo(input.BaseCultureName)))
{
baseLocalizedStrings = localizer
.GetAllStrings(includeParentCultures: true, includeBaseLocalizers: false)
.ToList();
}
using (CultureHelper.Use(CultureInfo.GetCultureInfo(input.TargetCultureName)))
{
targetLocalizedStrings = localizer
.GetAllStrings(includeParentCultures: false, includeBaseLocalizers: false)
.ToList();
}
var languageTextDtos = new List<LanguageTextDto>();
foreach (var baseLocalizedString in baseLocalizedStrings)
{
var target = targetLocalizedStrings.FirstOrDefault(l => l.Name == baseLocalizedString.Name);
if (input.GetOnlyEmptyValues)
{
if (!string.IsNullOrEmpty(target?.Value))
{
continue;
}
}
languageTextDtos.Add(
new LanguageTextDto
{
BaseCultureName = input.BaseCultureName,
CultureName = input.TargetCultureName,
Name = baseLocalizedString.Name,
BaseValue = baseLocalizedString.Value,
ResourceName = resourceName,
Value = target?.Value ?? ""
}
);
}
return languageTextDtos;
}
protected IStringLocalizer GetLocalizer(LocalizationResource resource)
{
return LocalizerFactory.Create(resource.ResourceType);
}
protected IStringLocalizer GetLocalizer(string recourseName)
{
return GetLocalizer(GetLocalizationResource(recourseName));
}
protected LocalizationResource GetLocalizationResource(string resourceName)
{
var resource = AbpLocalizationOptions.Resources
.Values
.FirstOrDefault(r => r.ResourceName == resourceName);
if (resource == null)
{
throw new AbpException($"Resource not found: {resourceName}");
}
return resource;
}
}
@pvaz can you share the GitHub link of the comment that solves in RC-4.1
Production release of version 4.0.0 has been released on 2020-12-03 Use the below command to update both ABP CLI and ABP Suite
dotnet tool update -g Volo.Abp.Cli && abp suite update
Migration guide from 3x to 4x => https://docs.abp.io/en/abp/latest/Migration-Guides/Abp-4_0
good! so update it to 3.3.2 I'm closing the issue. reopen if it continues... happy coding.
good to hear that. closing the issue
robb@designitcorp.ca
it doesn't matter where the solution is located.
the entites must be inside the root folder of the solution (in .suite/entities
folder)