Base solution for your next web application

Activities of "benjaminrivero"

I figure that is (now obviously) required include Entity Framework Package in Application Project. (where the DTO Resides)

Just open console, set Project default to Application and install Entity Framework

On this part of the tutorial:

<a class="postlink" href="https://www.aspnetzero.com/Documents/Developing-Step-By-Step-Mvc-Angularjs#changing-getpeople-method">https://www.aspnetzero.com/Documents/De ... ple-method</a>

comes an example using "Include" extension method for bring relation with Phones

var persons = _personRepository
        .GetAll()
        .Include(p => p.Phones)
        .WhereIf(
            !input.Filter.IsNullOrEmpty(),
            p => p.Name.Contains(input.Filter) ||
                    p.Surname.Contains(input.Filter) ||
                    p.EmailAddress.Contains(input.Filter)
        )
        .OrderBy(p => p.Name)
        .ThenBy(p => p.Surname)
        .ToList();

I am making a custom application follow that example with Angular 1, Module Zero and Entity Framework, and on one of my AppService files on the Application Layer. I am trying to do the same thing, using the Include extension method, but the problem is that this method is not recognized, there is no "using" that solve this problem, I can't compile. I read that this belong to System.Data.Entity so add this "using" but is not working.

Thanks, I think that i will doing it using migrations or custom code, I dont want mix the terminology (features - permissions) perhaps in future this could be confusing.

Thankssss

To me seems like signal IR is more apropiate to this target.

Yes, imagine that I have an application and add some new functionallity, and require new permissions. This new functionallity will be available to all the tenants registered and also the new ones. How update this new permissions to all pre registered tenants??

There is some "magic" code to do that? Or we have to iterate over the tenants/roles and update? like some migration

Thanks

Any one has a answer please? :(

Hi all, when I add a new permission in core file PROYECTFILEAuthorizationProvider on SetPermissions method... How update this new permission to all tenants in DB???

Thanks in advance

I was checking that file and on the line (115, check the link):

<a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/blob/f10fa5205c780bcc27adfe38aaae631f412eb7df/src/Abp.Web.Mvc/Web/Mvc/Views/AbpWebViewPageOfTModel.cs#L115">https://github.com/aspnetboilerplate/as ... el.cs#L115</a>

Is defined the method Ls. This method: "Gets localized string from given source for given key name..." so, is already done!!!

On the Razor views can be called like this:

<span>@Ls("SOURCENAME", "NameToShow")</span>

And this will show the value for the key name (2 parameter) of the Localization Source passed (1 parameter)

:mrgreen: :mrgreen: :mrgreen:

OK, I found that the problem was the XML, I change this just for testing:

<?xml version="1.0" encoding="utf-8" ?>
<localizationDictionary culture="en">
  <texts>
    <text name="Directorio" value="Directoriooooooo" />    
  </texts>
</localizationDictionary>

And in the menu the Word "Directoriooooo" appears, if I use the next code on the file PROYECTNAMENavigationProvider.cs:

AddItem(
                    new MenuItemDefinition(
                        "Directorio",
                        new LocalizableString("Directorio", "DirectorioSource"),
                        url: "#/directorio",
                        icon: "fa fa-phone"
                        )
                )

Now the problem is on my razor view, where I am trying to show the word with this code:

@L("Directorio")

But this show [Directorio] again.

Hi All, i am trying to add another Localization Source

Using this code in my PROYECTNAMECoreModule.cs :

Configuration.Localization.Sources.Add(
                new DictionaryBasedLocalizationSource(
                    "DirectorioSource",
                    new XmlEmbeddedFileLocalizationDictionaryProvider(
                        Assembly.GetExecutingAssembly(),
                        "PROYECTNAME.Localization.DirectorioSource"
                        )
                    )
                );

Then, inside Core project, Localization folder, add a new Folder called "DirectorioSource" where inside I have just 1 XML called: DirectorioSource.xml (this file is marked as embedded resource)

The XML is simple:

<?xml version="1.0" encoding="utf-8" ?>
<localizationDictionary culture="en">
  <texts>
    <text name="Directorio" value="Directorio" />    
  </texts>
</localizationDictionary>

And finally on my code I use:

PROYECTNAMENavigationProvider.cs

AddItem(
                    new MenuItemDefinition(
                        "Directorio",
                        new LocalizableString("Directorio", "DirectorioSource"),
                        url: "#/directorio",
                        icon: "fa fa-phone"
                        )
                )

also try:

AddItem(
                    new MenuItemDefinition(
                        "Directorio",
                        new L("Directorio"),
                        url: "#/directorio",
                        icon: "fa fa-phone"
                        )
                )

At the end the Word Directorio appears like [Directorio] :roll:

What I am doing Wrong??

Thanks

Showing 1 to 10 of 11 entries