Base solution for your next web application

Activities of "bilalhaidar"

Hello I am reading through the development guide and noticed the configuration for multitenancy applications.

Do I have to use a separate subdomain for each tenant in the application? Are there alternatives?

Thanks Bilal

Hi

I understand that this template adds an interceptor for. .cshtml files to be rendered by asp.net mvc and returned to client.

I have a question related to securing razor views.

Is there a built-in way to show/hide views based on permissions? Also even if user tries to access view by typing in url to prevent him.

I'm trying to secure my views as I have a requirement some groups can access certain views others cannot.

I appreciate your assistance.

Regards Bilal

Great thanks for your feedback.

So better I assign permissions on what data user can view/edit rather than securing dummy views.

Does the permission checking system support permissions such that if user 1 has permission 1, the user can edit the data, otherwise, user 1 can only view? Is that something baked-in, or I have to develop on top?

Thanks

So I could use a sub-domain or append the tenant name to end of domain? something like <a class="postlink" href="http://mydomain.com/t1">http://mydomain.com/t1</a> ?

When users logs into the system, can't at that stage conclude the tenant id from the db? What has been configured before that user 1 belongs to tenant 1?

Thanks

And one more thing, what's the added value of allowing Razor views with angular in a time you have to load separately since you cannot provide a model to a razor view in this case?

Thanks

Question

Hi,

In the case of using Aggregate Roots. I noticed that in the template, with any change in an entity, the data is being saved to the database (UOW).

In the case of Aggregate Roots, once you are adding objects, updating, etc. then you would save changes to the database. (DDD)

How to have the same behavior in a sense not to save to the database at every field change but rather group all changes at once?

To illustrate more, consider Event aggregate root and one of the collections it manages is EventRegistration. So when following DDD guidelines, I would create a new event registration and add it to the collection of event registrations on Event aggregate root. Then, I would save to database by calling Update() or so.

I cannot figure out how to visualize the above when using the boilertemplate. Shall I disable UOW and use it manually? Or is there a better approach?

Thanks

Hi, I've seen some code samples based on this template. When inside Application Layer, I don't see any code to check for validation or make use of Validation Data Annotation.

In ASP.NET I would do that in the Controllers before proceeding into checking business logic in the Domain Core.

What's the recommendation when using this template? Where shall I run those validation data annotations especially that I need to notify the client of such validitions.

Thank you, Regards

Oh that's awesome. So, ASPNET Zero will automatically run my validations at the Application Service level.

I have 2 related questions in here:

1- If I want to return the validation errors to client side, how is that possible given that the template would through exception if inputs are invalid (something similar to ModelState.Errors, etc.)

2- In some requirements I have, I need to validate based on "values" not fields. What I mean is that I have some reference data (ID, Name) to fill some Select elements. Based on a specific value, I will validate other fields. Is this a good pattern to follow or is there a workaround? That reference data could change also (Admin can edit). Is that supported or is that okay to do? I smell something wrong, as data might change and hence my validations might fail!

many thanks,

regards Bilal

Answer

So in other words, every action on an entity (changing 1 or more fields) causes UOW to save changes to DB?

So if I have 4 methods on an entity, each method to edit 1 property, I will end up hitting DB 4 times as each method would run and cause UOW to save data to the database?

Thanks, Bilal

Thanks for your help.

All links are "Page not found" can you find the correct link and send it pls?

Many thanks, Bilal

Showing 1 to 10 of 635 entries