Base solution for your next web application

Activities of "JeffMH"

I thought about that as well but it seems a little hackish. Although I can't say other things I am doing don't feel the same way.

So we have to generate a couple things right, first the entities and then the context. The context needs to be generated with .net core code because the fluent API is different in core. The Entities could be generated in EF 6. I don't know, maybe I will try that tomorrow. I am already using a T4 template (ReversePocoGenerator) for EF6 in another project so I could generate entities with it, and generate the first round of Context code with the one I am using above.

Ugh, sounds fugly just saying it out loud lol.

Do you do this currently? I would be curious to know what process you follow.

I am actually going through this same process right now and it's a bit cumbersome. Just for reference if anyone wants to know, we are using this to generate entities (we only generate them once):

<a class="postlink" href="https://github.com/ErikEJ/SqlCeToolbox/wiki/EF-Core-Power-Tools">https://github.com/ErikEJ/SqlCeToolbox/ ... ower-Tools</a>

We generate them once because we have to change them to be ABP entities (Base Classes, Interfaces, etc). It's possible but difficult to update the output of that process so we generate them up front, then all changes going forward are done code first.

But, back to my struggle. I am really debating on going back to EF 6 simply to be able to use some T4 templates to generate code. Going from an existing database with varying degrees of standards across the tables (primary keys, audit columns) is difficult when coming from an existing database. So, we are creating several workarounds to get it to play nicely with ABP. Plus, ABP system is merely one system in several so there are some database objects that really shouldn't be a part of this code base. I know, that's not ideal, but this is a large client, with many years of technology in production.

So, my question is can we take the current version of the downloaded Angular project that uses the full framework and switch out to use the EF6 libraries and not the Core libraries. I would have to code the seeds differently and a few things but I have all that code in other projects so I am just wondering if the EF 6 and EF Core projects are somewhat interchangeable???

Thoughts?

If they don't let you post any code, maybe you could just describe your solution so maybe we can take a stab at it. Then you could maybe review our code :)

Thank you! I was looking for that on the wrong screen.

On one of our projects we are using version 4.6 of asp.net zero. We can't upgrade to 5 because of the theme changes so we are going to stick with this version.

I always like to give new developers a link to your documentation and have them go through the Step by Step development guide. The current documentation now looks different with newer screenshots. I am wondering if you have old version of the documentation that I can link to for the specific version of the framework we are using.

Also, I still have some projects on the Angular 1.x version which it would be nice to have links to that documentation as well. So, anyway, any help would be appreciated.

Thanks

This is a cross platform issue with .Net. TimeZoneInfo.GetSystemTimeZones() returns different time zones between different OS platforms. There is no built in mapping between those in the .Net framework. My guess is this will be tough to fix without totally getting away from TimeZoneInfo class (EDIT: Fix may be the wrong word here lol...it's working perfectly as coded :) )

Here is a little bit of the talk on stackoverflow.

<a class="postlink" href="https://stackoverflow.com/questions/41566395/timezoneinfo-in-net-core-when-hosting-on-unix-nginx">https://stackoverflow.com/questions/415 ... unix-nginx</a>

Another link if you want to look at the code itself and see that the Unix flavor gets the IANA timezones:

<a class="postlink" href="https://github.com/dotnet/coreclr/search?utf8=%E2%9C%93&q=PopulateAllSystemTimeZones&type=">https://github.com/dotnet/coreclr/searc ... ones&type=</a>

Answer

Are you using Azure SQL? We are using multiple DB Contexts in Azure SQL. I think they recently released support for this. You may be hitting some other type of DB that isn't supported but just in case:

<a class="postlink" href="https://azure.microsoft.com/en-us/blog/elastic-database-transactions-with-azure-sql-database/">https://azure.microsoft.com/en-us/blog/ ... -database/</a>

In our app, we have separate contexts for the Host database and tenant databases. Transactions for sure work between the two. Anyway, this may not help but thought I would post it.

I need to get some advice on how to set default permissions on static roles not during tenant creation but during database emigrations. . I have several new permissions that are being created for a new feature. The associated permissions need to be turned on for several roles and I am wondering if there is a clean way to handle this.

For one, the permission isn't actually added into the system until Startup right? So, when I run the migrations through the migrator application, the permissions don't actually exists in the database yet for me to assign to a role.

Is there some guidance on this?

I need to put a dollar in the "didn't read the documentation" jar! Thanks man! I will give this a try.

FYI, I have the UserId of the user that is clicking the link. So, I know who I am trying to impersonate. Right now, I am:

  1. Validate URL / hash
  2. If !SignedIn, sign in as User.
  3. Do work
  4. Invalidate URL
  5. If I signed in manually, sign out
  6. I'm done.

the Hash that is passed in points to a record in the database with the necessary information to know everything I need to accomplish the requested task. I just need AbpSession.GetUserId() to return a valid UserId.

Sorry, just wanted to provide a little more info.

Showing 11 to 20 of 66 entries