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

Activities of "bilalhaidar"

According to what you said: This class is called only for successful results and...

And given the documentation: ASP.NET Boilerplate does not wrap Web API actions by default if the action has successfully executed. But it handles and wraps for exceptions.

There is still something missing.

For MVC or Web API Controllers included, do I need to place them in certain folders Like Controllers or so? OR just extend the proper base classes like AbpController?

Thanks

Most welcome and its our duty all of us to help each other here.

The entity I am using contains many fields more than 30. It is a single form that all data are related and hence I had to place them all in one entity.

More info is needed from my side?

Thanks

Thanks!

Look at the layout.cshtml under App\common\views\layout folder.

Inside the layout.cshtml you have the following calls:


    <script src="~/api/AbpServiceProxies/GetAll?type=angular&v=@(Clock.Now.Ticks)"></script>
    <script src="~/api/AbpServiceProxies/GetAll?v=@(Clock.Now.Ticks)"></script>
    <script src="~/AbpScripts/GetScripts?v=@(Clock.Now.Ticks)" type="text/javascript"></script>

Whenever you change language, a new request is set to sever and hence Application_BeginRequest runs to set the Thread culture.

Hope this helps, Bilal

Hi, I am developing a "Survey System" that includes some Angular js, CSS and HTML code in addition to Application Services and Domain Services and MVC controllers (basically for file uploads).

Can I include all these in a Module? For the static files I can make them embedded resources. Would that work? Or additional things are needed?

Thanks

I got the idea thanks a lot :D

Hi Tommy,

Have a look at the following class, it is where the Current Language is being sent to client-side.

<a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp.Web.Common/Web/Localization/LocalizationScriptManager.cs">https://github.com/aspnetboilerplate/as ... Manager.cs</a>

Then, Abp Framework, on each new Http Request it runs this code:

/// <summary>
        /// This method is called by ASP.NET system when a request starts.
        /// </summary>
        protected virtual void Application_BeginRequest(object sender, EventArgs e)
        {
            SetCurrentCulture();
        }

        protected virtual void SetCurrentCulture()
        {
            AbpBootstrapper.IocManager.Using<ICurrentCultureSetter>(cultureSetter => cultureSetter.SetCurrentCulture(Context));
        }

Hence, once the user changes culture/language, the Cookie is changed on the client side + on every new request, that cookie is read and stored inside the :

Thread.CurrentThread.CurrentCulture = new CultureInfo(language);
            Thread.CurrentThread.CurrentUICulture = new CultureInfo(language);

That's how I understand it.

Hopefully, Ismail would comment more given his knowledge and experience in this framework.

Regards

Hi, I followed the documentation to provide an oData Web API for one of the entities.

  1. I installed the Abp.Web.Api.oData nuget onto the WebApi project
  2. Added dependency to AbpWebApiOdataModule onto the WebApi module
[DependsOn(typeof(AbpWebApiModule), typeof(OnlineSystemsApplicationModule), typeof(AbpWebApiODataModule))]
    public class OnlineSystemsWebApiModule : AbpModule
    {
        public override void PreInitialize()
        {
            var builder = Configuration.Modules.AbpWebApiOData().ODataModelBuilder;

            //Configure your entities here...
            builder.EntitySet<PersonofConcern>("PersonofConcern");
        }

        public override void Initialize()
        {
            IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly());

            //Automatically creates Web API controllers for all application services of the application
            Configuration.Modules.AbpWebApi().DynamicApiControllerBuilder
                .ForAll<IApplicationService>(typeof(OnlineSystemsApplicationModule).Assembly, "app")
                .Build();

            Configuration.Modules.AbpWebApi().HttpConfiguration.Filters.Add(new HostAuthenticationFilter("Bearer"));

        }

    }
}
  1. Then created a new Controller: PersonofConcernController inside the Controllers folder:
public class PersonofConcernController : AbpODataEntityController<PersonofConcern>
    {
        public PersonofConcernController(IRepository<PersonofConcern> repository)
            :base (repository)
        {

        }
    }

When I run the application as <a class="postlink" href="http://localhost:8080/odata/PersonofConcern">http://localhost:8080/odata/PersonofConcern</a> in the browser,

I get all json data of all records in DB but not all columns are returned, only a few subset.

Where shall I look into this?

Thanks

Showing 201 to 210 of 635 entries