Base solution for your next web application

Activities of "cyklussoftware"

I am working through the PhoneBookDemo for ASP.NET Core + Angular in combination with the brand new Power Tools.

On a brand new project, I add a new Entity called TSEvent. It has a single property (for testing purposes) called Name.

When I try to compile using "npm start", I am given errors:

create-or-edit-tSEvent-modal.component.ts: error TS2305: Module 'service-proxies' has no exported member 'TSEventServiceProxy'.
create-or-edit-tSEvent-modal.component.ts: error TS2305: Module 'service-proxies' has no exported member 'CreateOrEditTSEventDto'.
tSEvent.component.ts: error TS2305: Module 'service-proxies' has no exported member 'TSEventServiceProxy'.
tSEvent.component.ts: error TS2305: Module 'service-proxies"' has no exported member 'TSEventDto'.
service-proxy.module.ts: error TS2551: Property 'TSEventServiceProxy' does not exist on type 'typeof service-proxies'. Did you mean 'TenantServiceProxy'?

Is this a bug in the Power Tools? Do the Power Tools work with ASP.NET Core + Angular project types?

Assuming you mean the Swagger API, yes it runs.

Let me add that I am using a Combined Solution in Visual Studio 2017 and the Angular project worked fine before I used the Power Tools

Running NSwag was what I needed. I overlooked this. Thank you!

Not sure why, but I cannot log in to the Default tenant. I can log into the Host just fine, but not Default. I get the error "A problem occurred while trying to communicate with the server. Do you want to try again?"

Running on Android emulator. Host running using .BAT file.

Question

I am running the latest version of ASP.NET Core + jQuery in VS 2017

I created a new Edition (Paid) with a 14 day trial I created a new Tenant (Free Trial with Paid edition) from the Login page screen using the New Tenant link (to test how a customer would create a tenant) I got the message "Your account is waiting to be activated by system admin". Does this mean an activation email is sent to the Tenant (obviously not working on the dev machine), or does that mean I need to manually activate the Tenant?

Anyways, I logged into the Host account, navigated to Tenants, and clicked "Edit" on the new Tenant. I tried to set the "IsActive" flag in the editing menu. When I click Save, nothing happens. I noticed that there is an error in the Google Chrome debugger that says "Uncaught TypeError: Cannot read property 'apply' of undefined".

Is this intended behavior because a valid email activation is required for New Tenants? Or is it a bug with the Trial period?

Note: I can set IsActive on a New Tenant using the Standard (Free, Unlimited Duration) edition.

I am using ASP.NET Core + jQuery version 5.2.

So, I've successfully created two new entities with their respective UIs. Location and LocationCategory.

Location contains several properties including a Name. LocationCategory contains a single property called Name.

Since the entities created with the RAD tool are basically Existing Entities, I am following the tutorial found here: [https://aspnetzero.com/Documents/Extending-Existing-Entities]).

Because the RAD tool doesn't support Relationships yet, I manually added a Many to 1 relationship between Location (many) and Location Category (1), applied migration, and updated the database. My database changed as I expected (a Location has one LocationCategory).

I get stuck starting at the "SHOW ADDRESS ON THE UI" section of the Extending Existing Entities tutorial. The data table is set up through the Index.js page and I need to add a column definition.

My first question is: How would I show the Name property of a LocationCategory that is associated with a Location in the data table through the Index.js page? This is an example column definition for the Name property of Location in the Index.js file:

            {
                targets: 1,
                data: "name"
            }

Thanks for the suggestion. I think I will be able to figure my way through this eventually. I'll re-create my solution when foreign key support is added. In the mean time, it's good for me to learn about the way ASP.NET Zero works.

I am currently struggling with DTO circular references. I have the following entities:

[Table("Location")]
    public class Location : Entity , IMustHaveTenant
    {
        public int TenantId { get; set; }

        [Required]
        public virtual string Name { get; set; }

        public virtual int Radius { get; set; }

        public virtual LocationCategory.LocationCategory Category { get; set; }
    }
[Table("LocationCategory")]
    public class LocationCategory : Entity , IMustHaveTenant
    {
        public int TenantId { get; set; }

        [Required]
        public virtual string Name { get; set; }

        public ICollection<Location.Location> Locations { get; set; }
    }

and the corresponding DTOs:

public class LocationDto : EntityDto
    {
        public string Name { get; set; }

        public int Radius { get; set; }

        public LocationCategory.Dtos.LocationCategoryDto Category { get; set; }
    }
public class LocationCategoryDto : EntityDto
    {
        public string Name { get; set; }

        public Collection<Location.Dtos.LocationDto> Locations { get; set; }
    }

I have set up my LocationAppService and LocationCategoryAppService using the ".Include" method so that the navigation properties for the Entities are filled.

When I test the "getAll" method using the Google Chrome console, I get a 500 Internal Server Error. Eventually, I figured out that if I comment out either "public LocationCategory.Dtos.LocationCategoryDto Category { get; set; }" OR "public Collection<Location.Dtos.LocationDto> Locations { get; set; }" I am able to view the data in the database. So I clearly have a circular reference error.

My questions are these:

  1. Is it possible to change the JSON serializer settings or is it still embedded in ABP stuff?

  2. Without changing the JSON serializer settings, is there a way to resolve the circular reference issues?

Note: Both Locations and LocationCategories will have their own dedicated UI pages (as generated by the RAD Tool). I will want to look up (through navigation properties) which Locations belong to a LocationCategory and vice-versa from each UI set.

I use "npm uninstall datamaps" from my MVC directory before attempting to delete a project.

Will this feature be released at the same time as the Foreign Key / Existing Entity feature?

Foreign Key / Existing Enity Forum Post: #4736

Showing 1 to 10 of 42 entries