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

Activities of "bilalhaidar"

Sure, I will check it and get back to you. Many thanks

Ah, I thought all such exceptions are handled and sent back to client.

When an error happens at server, how is the client informed in this case? I thought it was handling that interface. Can you please guide me through the code to see where is the framework handling errors and sending them to client (Popup message).

Thanks

Hi Ismail,

For first option, you mean I bring Locations and the rest of reference data while SetTenantId is Null. Then, use Linq to SQL to bring in all events without any left outer joins. Then, loop over data and bring in location name, etc.?

For second option, I know I've used IMayHaveTenant on all data that is part of host (I made that just in case). So, when I disable this filter, I can then for each join specify that TenantId is null?

Did I understand your point correctly?

IMayHaveTenant: What does this filter add to the query anyway? For me i noticed that if an entity has IMayHaveTenant, and then if a query is executing inside a Tenant (!= Null), then a WHERE is added to that entity trying to filter based on TenantID since it was marked IMayHaveTenant. Correct?

What if I remove IMayHaveTenant? What happens.

Thanks

That's why I am thinking, if I develop my own modules without touching any single file from Framework, wouldn't be easy for me to just replace files of framework and compile?

In another post, I asked how to create a new module. So my point is to know, can I in a separate module (can be done as solution folder with projects underneath), be able to add my own permissions? my own settings?

Currently, I have to go to Authorization folder in .Core and edit the AuthorizationProvider.

If I can configure my modules without touching the any file that comes with framework, then it might be easier to upgrade.

So all my code will be under a solution folder and underneath I have .Core, .Application, etc.

Is that doable?

Thanks

As popup. So, when I click the Calendar icon it opens.

Thanks

Sure, here you go.

  1. Entity (.Core)

  2. AppService (.Application)

  3. Seed method (.EntityFramework)

  4. Table in DB (<a class="postlink" href="https://s21.postimg.org/ra51m36lz/image.png">https://s21.postimg.org/ra51m36lz/image.png</a>)

  5. In a common lookup AppService I use this code:

public async Task<ReferenceDataDto> GetReferenceTables()
        {
            // Bring Shelters from specific Tenant user is logged in to
            List<Shelter> shelters;
            shelters = await _shelters.Shelters.OrderBy(s => s.ShelterCode).ToListAsync();

This AppService I was calling while logged in as Admin Host.

Appreciate your assistance.

Bilal

Good to know.

Any guides now on how to do that manually? Steps involved, references, etc.

Great, I can see it now.

In the DefinitionManager.Initialize() it saves all settings from all providers.

SetingsManager uses the SettingsStore to persist to DB.

I still have one missing link: SettingsManager, where is it called to persist whatever settings DefinitionManager has? I tried to look for that, but couldn't.

When searching for code how it works, is there like a guide or logical path to follow or starting point?

Thanks Ismail :)

Hi,

I have a set of data that is stored per Tenant.

When I logging in under Host Admin, I try to access that data, I set this:

List<Shelter> shelters;
            shelters = await _shelters.Shelters.OrderBy(s => s.ShelterCode).ToListAsync();

I get all the data. The data is all stored with a TenantId = 1.

So, when I am logging in as Admin Host, the tenant Id should be null.

How come the data is retrieved?

Am I missing something here?

This is the WHERE clause in SQL after using SQL Profiler:

WHERE 
	(
		([TenantId] = 0) OR ( CAST( [TenantId] AS int) IS NULL) OR (1 IS NOT NULL)
	) AND 
		(([IsDeleted] = 0) )

1 IS NOT NULL always true, hence all data are returned. But why do I have that additional filter?

Thanks Bilal

Hello,

If I want to organize my code in solution folders, where every solution folder has its own .Core, .Application, .EntityFramework.

Do you have a VS template to create a new module?

For instance, if I want my ModuleX to define some permissions, am I supposed to only added them in the main .Core project, or I can add them in the .Core of my ModuleX?

Reason, why I am asking for this is, I want to keep the framework code untouched and do my work in some other modules, so that I might have it easier to upgrade the framework code when a new release is out.

Thanks Bilal

Showing 501 to 510 of 635 entries