Base solution for your next web application

Activities of "inzone"

Hello,

I am getting started with ASP.NET Zero and generated a new project with the following settings: Project Type: ASP.NET Core MVC & jQuery Project version: 5.0.6 (latest) Framework: .NET Framework 4.6.1

I see the generated csproj files have assembly references like this:

<ItemGroup>
		<Reference Include="System.ComponentModel.DataAnnotations" />
	</ItemGroup>

The same csproj file at the Github repository looks like this: (See <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/blob/dev/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Core.Shared/MyCompanyName.AbpZeroTemplate.Core.Shared.csproj">https://github.com/aspnetzero/aspnet-ze ... red.csproj</a>)

<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
    <Reference Include="System.ComponentModel.DataAnnotations" />
  </ItemGroup>

So for some reason, the template downloader is removing the ItemGroup condition and causing the following build warning:

Severity	Code	Description	Project	File	Line	Suppression State
Warning	MSB3245	Could not resolve this reference. Could not locate the assembly "System.ComponentModel.DataAnnotations". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.	InAccess.Core.Shared	C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets	2041

Is this an expected behavior for the template generator or the reference condition for net461 should be preserved?

Also, latest version of metronic recommends building all the dependencies with yarn instead of calling gulp --prod, is yarn also recommended for ASP.NET Boilerplate or I should stick with gulp?

Best regards, Emiliano.

Hello,

I am developing an Event management platform, event participants can have their own user account and can be shared between all tenants.

The idea is that if one of this users logs in into their account, they can see all the events they are registered to, regardless of the tenant these events belong to.

So, how should I manage these kind of users (will have a role like "Participant") so I can create them without associating them to any tenant?

Do I need to make any modification to AspNetZero / ASP.NET Boilerplate to make this work?

Best regards, Emiliano.

Hello,

We have started developing the application services for our product and we are struggling to find the most appropiate way of querying data from a large entity graph.

Hello,

I understand that, but I would have performance issues doing it that way because I have to join though many entities and domain services should not use repositories according to DDD guidelines.

Maybe I should implement custom repositories when I need to do complex queries with multiple joins?

Hello,

I need to implement a data filter for our Event entity. The filtering should be done by Event Id, retrieved from an IEventSession we defined, and should be overriden with the UnitOfWork SetFilterParameter method.

This is what I have done so far, according to this document: <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/Data-Filters">https://aspnetboilerplate.com/Pages/Doc ... ta-Filters</a>

Defined the interfaces IMayHavEvent and IMustHaveEvent Defined filter names in a static class Registered the filters at the Core project Module using Configuration.UnitOfWork.RegisterFilter

So what I need to do now, is to do the actual filtering. The docs say that EntityFramework.DynamicFilters do not apply for EF Core, so what is the most convenient way to implement the filter? If I do it at repository level, what should I override at the RepositoryBase abstract class?

Thank you!

<cite>aaron: </cite> Override ShouldFilterEntity and CreateFilterExpression in your DbContext.

Ok, I see I can get it done easily that way.

In order to get the filter parameter defined with IUnitOfWork.SetFilterParameter, I have to use IUnitOfWork.GetFilter and check in the DataFilterConfiguration.FilterParameters collection, right?

Question

Hello,

For some external integrations that use redirects to the AspNetZero based application I need to debug with SSL (HTTPS) I've tried enabling SSL to the project, but I am getting no response when trying to access the HTTPS URL.

Any further steps to be done in order to fully enable SSL to the AspNetZero solution?

Thank you!

You can query data using Repositories. Read more: <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/Repositories">https://aspnetboilerplate.com/Pages/Doc ... positories</a>

When I get UserFriendlyExceptions related to DTO Validation (AbpValidationException) the exception message detailing the properties with errors display the property name as defined in the DTO class.

Is there any way to set a localized display name for those properties so the error messages the users can get are more clear about what fields have errors?

I think that's not exactly what I'm talking about.

Look at this example.

public class RegisterInput
{
    [Required]
    public string FirstName { get; set; }
    
    [Required]
    public string LastName { get; set; }
}

Using that DTO with validation and provide this JSON to the app service:

{ firstName: "Emiliano", lastName: null }

Then I will end up with an exception with a message like The field LastName is required

I want to change that LastName to Last Name

Is there any data attribute to set to the property to tell ABP to show Last Name as the display name for that property?

Showing 1 to 10 of 14 entries