Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "luqc1985"

Thank you. That solved it...

If I need to use the SettingManager when I use ICustomValidate validation in inputDto, what do I need to do?

@michelmk2 I didn't notice , that I just tried it, it is also 404. Back to my account also needs to modify the corresponding link. There is no tenant information in the abp object, only appPath is found.

@ismcagdas Thanks, But the way you said this is to directly extend the properties. I want to get two tables for employees and customers. The basic data uses user data, and the newly added two tables store the extended attributes.

Thank you, I already understand the logic inside.

public class Form : FullAuditedEntity
{
    public virtual List<FlowUnit> FlowUnitList { get; set; }
}

If I add a navigation property to the Form, FlowUnitList, how should the query be written to get the list?

<cite>ryancyq: </cite> Do you mean angular file upload library?

Currently, AspNetZero is using <a class="postlink" href="https://github.com/valor-software/ng2-file-upload">https://github.com/valor-software/ng2-file-upload</a>

Sorry, I didn't express it clearly. I want to say that the ASP.NET Core server is about the uploaded code. Is there any recommended packaged plugin that not only satisfies the upload, but also supports watermarks, thumbnails, etc. Perfect point plugin. If open source is better.

Thanks

<cite>maliming: </cite> add it to resolvers in the PreInitalize method of your web module

Configuration.MultiTenancy.Resolvers.Insert(0,new MyDomainTenantResolveContributor());
public override void PreInitialize()
        {
			Configuration.MultiTenancy.Resolvers.Insert(0, typeof(MyDomainTenantResolveContributor));
}

It's ready to go, thank you very much

<cite>alper: </cite> hi,

for your subdomain issues you can create your own DomainTenantResolveContributor

#5482@5506404d-9f34-4a1a-a88f-6c5d1da6fbbe

public class MyDomainTenantResolveContributor : ITenantResolveContributor, ITransientDependency
	{
		private readonly IHttpContextAccessor _httpContextAccessor;
		private readonly IWebMultiTenancyConfiguration _multiTenancyConfiguration;
		private readonly ITenantStore _tenantStore;

		public MyDomainTenantResolveContributor(
			IHttpContextAccessor httpContextAccessor,
			IWebMultiTenancyConfiguration multiTenancyConfiguration,
			ITenantStore tenantStore)
		{
			_httpContextAccessor = httpContextAccessor;
			_multiTenancyConfiguration = multiTenancyConfiguration;
			_tenantStore = tenantStore;
		}

		public int? ResolveTenantId()
		{
			if (_multiTenancyConfiguration.DomainFormat.IsNullOrEmpty())
			{
				return null;
			}

			var httpContext = _httpContextAccessor.HttpContext;
			if (httpContext == null)
			{
				return null;
			}

			var hostName = httpContext.Request.Host.Host.RemovePreFix("http://", "https://").RemovePostFix("/");
			var domainFormat = _multiTenancyConfiguration.DomainFormat.RemovePreFix("http://", "https://").Split(':')[0].RemovePostFix("/");
			var result = new FormattedStringValueExtracter().Extract(hostName, domainFormat, true, '/');

			if (!result.IsMatch || !result.Matches.Any())
			{
				return null;
			}

			var tenancyName = result.Matches[0].Value;
			
			if (string.Equals(tenancyName, "admin", StringComparison.OrdinalIgnoreCase))
			{
				return null;
			}

			var tenantInfo = _tenantStore.Find(tenancyName);
			if (tenantInfo == null)
			{
				throw new UserFriendlyException("404", "404Test");
			}

			return tenantInfo.Id;
		}
	}
public override void PreInitialize()
        {
			IocManager.Register<ITenantResolveContributor, MyDomainTenantResolveContributor>(DependencyLifeStyle.Transient);
}

Like this? But it doesn't seem to be enforced...

<cite>ryancyq: </cite> Looks like you just want to read app.config in .Net Core application. If so, you can try the approach mentioned in <a class="postlink" href="https://stackoverflow.com/a/45042421/6856176">https://stackoverflow.com/a/45042421/6856176</a>

If you don't want Abp tables being migrated, just directly inherit your DbContext class instead of AbpZeroDbContext class.

I got it , Thanks for checking into this. Have a nice day :)

Showing 1 to 10 of 14 entries