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

Activities of "marble68"

Core MVC version 11.0 Using the Power Tool, ffter generating an entity - I get this.

How can I make this go away? What do I need to do to my package.json files? Ultimately, how do I make this go away?

This isn't really a question, just posting this in case anyone needs a solution (and for myself in case I forget and need to do this again).

Basically - when files are uploaded, they're held for a short time in cache, then flushed to the database. This is fine for small files, but if you need large files, or want to encrypt them, etc. there could be a lot of places you have to touch in code.

I have a need to split the storage based on what it is. Profile pics are fine in the database, but what about a large PDF or data you want to encrypt?

As a proof of concept, I tweaked the DbBinaryObjectManager and the BinaryObject, then, instead of returning the IRepsoitory Task directly, I examine the BinaryObject entity which self describes where to find it.

More details can be found here: https://github.com/aspnetzero/aspnet-zero-core/issues/1612

Solution?

Answer

FWIW - that's exactly what I do. I use GitHub actions, and I as part of my powershell build script, I build and run the migrator.

Also - might be germane to your needs: https://theitbros.com/powershell-gui-for-scripts/

How to make a GUI for a powershell script.

Note, I think each version would probably want a script for doing the update with rollback upon failure.

Your PS script could dump the database, flip IIS to maintenance page, copy the folder with a rollback name while migrations are applied, deploy into the folder, smoke test the new site on migrations complete.

Or some variation of that.

I'd frankly do 3 scripts - a backup and rollback first - make sure those are bulletproof.

Sandwich your update between them. If anything goes wrong - revert.

FWIW, if you're doing windows - I'd do powershell scripts for the setup. Make sure servers have remote management enabled, then you can do remote powershell on both boxes.

With that you could deploy MSSQL and configure it - then setup IIS etc and deploy the site.

For updates, I'd suggest you setup a "deployment" server in the cloud, then use github actions to build your deployment package- with the script updating the versions in a json file provided by a static URL.

Then, you could ping your deployment server one a regular basis and compare returned version to installed version, and alert admin for minor / major updates.

Your job could even download your updated scripts & builds and stage them for deployment during maintenance window.

Should be about 2 to 5 days worth of dev, testing, and documentation for a minimally viable solution.

11.01 MVC CORE

The rad tool lets us create 1 to 1 navigation properties or one to many, dropdown or lookup table.

This is great.

However - since it doesn't do many to many - what's the best approach to this?

Scenario: "Package entity" - the user can create a package, let's call it the Package entity. The user can also create services such as wash, oil change, wipers, tiers, and windshield, lets call that entity CarService

Thus:

Package 1 could have an oil change and tiers Package 2 could have an oil change and wash Package 3 could have wash and tires

I tried to do a 1<>many of Package and service. If I Edit Service, I can add a CarService to the package.

However, I can only add that carservice to one package?

If a CarService can belong to multiple Packages, should I do the entity relationship the other way? As in, do a master detail on the CarService entity?

Would the best approach to this be to create a new entity with navigation properties to both Package and CarService for creating these manually, but eventually modifying the user interface to provide more elegant matching (perhaps with drag drop or something)? In other words, do it this way, then modify the views and view objects to get the relationships?

Or is there a better approach that is right in front of me?

Thanks for any advice

FWIW - if you log in as host, the TenantId is null.

I'd just create a new tenant then login with that admin. If clean database, should be tenantid 2

This is what I'm doing now - Ok, great - but I need to add that TenantId to the DTOs and Entity as well I guess; unless I specify it in the rad tool.

ok, Thanks.

Showing 51 to 60 of 238 entries