Base solution for your next web application

Activities of "andry3ag"

I cannot find any documentation regarding this issue. Has anyone done this before? If so, some help would be great. Do I have to deploy twice or is it better to convert the module to a NuGet package, so I only have to deploy once?

I have successfully deployed a solution to azure but when I try to create an account on the login page the bottom of the modal displays the following message:" ERROR for site owner:Invalid domain for site key " and I cannot create a new user so I can login. I have attached the snapshot of the modal incase if its helps.


public class Dashboard : FullAuditedEntity<int, DashboardModuleUser> { ...

    public virtual ICollection&lt;Widget&gt; Widgets { get; set; }
}

public class Widget : FullAuditedEntity&lt;int, DashboardModuleUser&gt;
{
    [ForeignKey("WidgetTemplateId")]
    public virtual WidgetTemplate WidgetTemplate { get; set; }
    public virtual int WidgetTemplateId { get; set; }

    [ForeignKey("DashboardId")]
    public virtual Dashboard Dashboard { get; set; }
    public virtual int DashboardId { get; set; }
}

So, I have the relationship above established, but when I return it to the frontend as PagedResult, it seems the Widgets in the Dashboard are not eager loading.

How should I setup to ensure my collection of Dashboards will eagerload Widgets and all my Widgets will inturn eager load WidgetTemplate BUT not Dashboard of course, else it will have circular reference issue.

My current Dto for Dashboard are set up as so:

[AutoMapFrom(typeof(Dashboard))]
public class DashboardDto : EntityDto
{
    public string Title { get; set; }

    public DashboardModuleUser User { get; set; }

    public string Content { get; set; }

    public IEnumerable&lt;Widget&gt; Widgets { get; set; }
}

Thank you.

Answer

I see, I will use fluent api then. Thanks alot guys.

Question

Hi,

how do I establish many-to-many relationship? For example, if a blog has many entries and and entry can belong to many blogs?

I tried setting doing it code first as suggested in this url <a class="postlink" href="http://www.entityframeworktutorial.net/code-first/configure-many-to-many-relationship-in-code-first.aspx">http://www.entityframeworktutorial.net/ ... first.aspx</a> but when I do Add-Migration, the script do not seems to create the joining table.

What about integer autoincrement?

Hi I have a few questions that would like to be answered.

1 I am trying to create multiple modules and have a core application that is compose of these multiple modules. However, it seems that a module will only expose it's controllers to the core application. When a web controller tries to deliver a view template, it tries to find the template file in the core application filesystem rather than the module's. I figured we can have a build process that copies all the frontend files to the core application, but I would like to know if there's any better approach you would recommend.

If this is the only approach, do you have a build script we can have access to?

2 Do individual module need to include module zero and all the multi tenancy, permissions, authentication logic? Can all this be simply handled from the core application so that there is only a single source of truth?

If not, how do we handle it? The examples available online do not seem to address this issue.

3 How do we handle relationships that stranded over 2 or more plugins or between plugins and the core application? For example, user having 1 to many blog entity where blog is part of the Blog plugin.

  • From which end do we address the relationship? From the core application or from the module end? Or both?

When creating new entities, is there any way to specify that an Id should be auto-incremented, or in the case of uniqueidentifier/GUID, invoke NEWID() as a default value?

Showing 51 to 58 of 58 entries