Base solution for your next web application

Activities of "benjaminrivero"

Hi All, Hello @hikalkan

First of all, this framework is amazing, I have some experience with ASP .NET MVC, jQuery, Ajax and that Stuff, but Angular is great and the way that AspnetBoilerplate is build is awesome (I learn a lot with it, conceptual and practical things, right now I can create entities, services, dto's, SPA with Angular and connect that entities thanks to the WebApi, etc.).

I am stuck in one thing, please someone can clarify me

I am reading: <a class="postlink" href="https://www.aspnetzero.com/Documents/Developing-Step-By-Step#authorization-for-phone-book">https://www.aspnetzero.com/Documents/De ... phone-book</a>

The part of permissions, can someone explain, why permissions are not dynamic (like roles, tenants)? I mean why are declared on the code, and there is no interface for create them. (I create a demo on aspnetzero site and see the permissions available but can't find the way for create new permissions, all are declared on code?) Maybe is something conceptual... :?

Also, what are exactly are Organization Units, some simple example would be great. :roll:

thanks in advance, with the knowledge I am planning to write a step by step tutorial of this framework :mrgreen: :!:

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

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.

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:

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

Any one has a answer please? :(

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

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

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

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.

Showing 1 to 10 of 11 entries