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

Activities of "bilalhaidar"

Yes this is the code:

public async Task<DataTable> GetPocPivotQueueAsync(int? tenantId, string firstOrLastName, bool? isActive)
        {
            return await Task.Run(() =>
            {
                return GetPocPivotQueue(tenantId, firstOrLastName, isActive);
            });
        }

        public DataTable GetPocPivotQueue(int? tenantId, string firstOrLastName, bool? isActive)
        {
            // creates resulting Queue
            var result = new DataTable();

            SqlCommand cmd = null;
            try
            {
                // prepare command
                cmd = new SqlCommand("[dbo].[sp_GetPocInPivot]", (SqlConnection)this.Context.Database.Connection);
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Parameters.AddWithValue("@TenantId", tenantId.HasValue ? tenantId.Value : (object)DBNull.Value);
                cmd.Parameters.AddWithValue("@Filter", string.IsNullOrEmpty(firstOrLastName) ? (object)DBNull.Value : firstOrLastName);
                cmd.Parameters.AddWithValue("@IsActive", !isActive.HasValue ? (object)DBNull.Value : isActive.Value);

                // Use DataTables to extract the whole table in one hit
                using (SqlDataAdapter da = new SqlDataAdapter(cmd))
                {
                    // fill the datatable
                    da.Fill(result);
                }
            }
            finally
            {
                if (cmd != null)
                {
                    // close command
                    cmd.Dispose();
                }
            }

            return result;
        }

Hello, Is it possible to keep the Angular and Core apps separate and develop instead of combining them both in one app?

How would then I deploy the app to IIS?

One more question, what are the databases available for the Core/Angular?

Thanks Bilal

Hello,

I've been using the ASP.NET MVC 5 + Angular 1.x for some time.

I've recently started learning Angular 2, and I should be starting a new course on ASP.NET Core.

I am planning to switch to using the Angular 2 project type for this framework. Do you think it's a good idea? Would it be difficult for me? But then I think again, how would I be able to learn those technologies if I dont start using them in a project.

I am not sure of the complexity of the ASP.NET Core/Angular 2 app here, that's why I am asking, ..

Thanks in advance.

Thanks Ismail. I can do it myself, I just wanted to know where to put the configuration. Can you let me know?

Also, I can send you a sample project like usual to check it out.

So I don't use the OData modude by ABP?

Where shall I configure oData? In the WebApi project? Using PostInitialize?

Even when I call: <a class="postlink" href="http://localhost:6240/odata/$metadata#Pocs">http://localhost:6240/odata/$metadata#Pocs</a>

I don't get all fields!

I am not sure if oData is working fine in Abp.

What's the workaround? Any idea?

Thanks

No problem. I need such detail as to understand how things run and that way I can debug issues more. Thanks

I just followed the documentation you have on this topic. Part of the fields are returned but not all. Mostly all fields created by Abp like Creation... and 1 property from my entity.

This is what I've added on the .WebApi Project.

/// <summary>
    /// Web API layer of the application.
    /// </summary>
    [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 class PersonofConcernController : AbpODataEntityController<PersonofConcern>
    {
        public PersonofConcernController(IRepository<PersonofConcern> repository)
            :base (repository)
        {

        }
    }

On this page: <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/Web-API-Controllers">https://aspnetboilerplate.com/Pages/Doc ... ontrollers</a>

Check the wrapping section towards the end of the page.

And then, this class below, when is it used then?

protected virtual void WrapResultIfNeeded(HttpRequestMessage request, HttpResponseMessage response)
        {
            if (!response.IsSuccessStatusCode)
            {
                return;
            }

OK thanks. In case I need more help on this topic I will post again here.

Showing 191 to 200 of 635 entries