Base solution for your next web application

Activities of "verrrrrrrrrrrrrdi"

Answer

Hi @aaron,

How about if i want to get all data based on filter on modelB? Your solution is not good because i have to get all data from model A first. This is so dangerous solution if modelA have 1,000k more record.

Do you have other solution to implement join entities on multiple dbcontext? please help

Question

Hi,

I have 2 dbcontext .

FirstDbContext

public class FirstDbContext : AbpZeroDbContext<Tenant, Role, User>
        {
            public virtual IDbSet<ModelA> ModelAs { get; set; }
        }

        public FirstDbContext()
            : base("Default")
        {

        }

        public FirstDbContext(string nameOrConnectionString)
            : base(nameOrConnectionString)
        {

        }

        public FirstDbContext(DbConnection existingConnection)
           : base(existingConnection, false)
        {

        }

        public FirstDbContext(DbConnection existingConnection, bool contextOwnsConnection)
            : base(existingConnection, contextOwnsConnection)
        {

        }

SecondDbContext

public class SecondDbContext : AbpZeroDbContext
        {

            public virtual DbSet<ModelB> ModelAs { get; set; }
        }

        public SecondDbContext()
            : base("SecondDbContext")
        {

        }

When i use linq to join model a and model b like this:

var q = (from a in _modelA.GetAll()
                     join b in _modelB.GetAll()
                     on a.modelCode equals b.modelCode
                     select a).ToList();

I has implement new EF transaction strategy in myProjectDataModule like this:

Configuration.ReplaceService<IEfTransactionStrategy, DbContextEfTransactionStrategy>(DependencyLifeStyle.Transient);

It show error message : The transaction passed in is not associated with the current connection. Only transactions associated with the current connection may be used.

Please help ...

Answer

Hi @ismcagdas,

Yes i have implement SignalR hub and manager on web layer.

I have create simple loop to show progress result to UI

[HttpPost]
        public ActionResult DoJob()
        {
            var job = JobManager.Instance.DoJobAsync(j =>
            {
                for (var progress = 0; progress <= 100; progress++)
                {
                    if (j.CancellationToken.IsCancellationRequested)
                    {
                        return;
                    }

                    Thread.Sleep(200);
                    j.ReportProgress(progress);
                }
            });

            return Json(new
            {
                JobId = job.Id,
                Progress = job.Progress
            });
        }

i have problem to connect from this ProgressController to My service in Application layer. can you give me a step by step how to solve this? Any help would be appreciate it!

Answer

Hi @aaron,

Thanks for your help! appreciate it.

Question

Hi,

Can you give me a sample how to implement progress bar using Signal R and Angular JS? I'm using ASP.Net MVC 5.x + Angular JS Template. Any help would be appreciate it. Thanks

Answer

Hi @aaron,

Thanks for your help, appreciate it!

How to set value LastModificationTime and LastModifierUserId when Repository.Insert executed?

Question

Hi,

How to rename base column in FullAuditedEntity like this: CreatorUserId -> InputUN CreationTime -> InputTime

please help..

Hi,

How to do that? can you give me a step by step sample ?

Hi @aaron,

This is paid libraries! Can you provide other free & open source libraries ? Also can i custom IRepository using this libraries? Thanks

Question

Hello,

Can you provide me a solution to bulk insert instead of using for each and insert 1 by 1? Thanks

Showing 21 to 30 of 35 entries