Base solution for your next web application

Activities of "sampath"

Hi ismcagdas,

Thanks a lot for the feedback.

But I didn't get this, This class syncs the user data from users table to your new table.So can you please explain a little bit more about that? Thanks.

Hi ismcagdas,

Ok, Thanks.

Actually, it was a very strange issue. I have created 2 Dtos on 2 different layers with the same name (i.e. DocumentDto). Two layers are Application layer and Web.Core layer. After that Swagger UI showed above error.I have renamed One Dto and then problem vanished. Very strange no? Any thoughts?

Hi ismcagdas,

Hmm ... Very interesting ... Really nice explanation. Thanks a lot :)

Hi,

My client wants to purchase a latest ng-2 version of ASP.netZero. But we have developed an app using ng-1 version of ASP.netZero. So we need to migrate that code base to ng-2 version.So can you tell me the best possible way to do that? Thanks.

Hi ismcagdas,

Can you please share the steps which you have followed when you migrated it from ng-1 to ng-2? Any doc or something like that? Thanks.

Hi ismcagdas,

Did you use this doc <a class="postlink" href="https://angular.io/docs/ts/latest/guide/upgrade.html">https://angular.io/docs/ts/latest/guide/upgrade.html</a> or have you rewritten all without considering that doc? What is your advice for me? Shall I start to rewrite everything again according to the ABP ng-2 version's architecture or is there any upgrade path? According to your experience which one is best suited for me.My app is still in development mode. Please tell me the best method which I can follow without too many issues in the future.Thanks.

Hi ismcagdas,

Can you give me the Angular2 jtable component's url (git repo or else)? Thanks.

Thank you @rvanwoezik.It works :)

Hi,

I have implemented Redis cache as shown below.But now on test method where it shows all the actual data on the database instead of the seed data.Because data was cached.Could you tell me how to avoid this situation? Thanks.

Note: I'm using Asp.net Zero

BankAppService.cs

public async Task<ListResultDto<BankListDto>> GetAllBanksAsync()
        {
            var cache = RedisConnectorHelper.Connection.GetDatabase();
            var values = RedisConnectorHelper.GetCache<BankListDto>(AppConsts.Banks, cache, o => o.Name);//get cache
            if (values != null) return values;

            var banks = await _bankRepository.GetAllListAsync();
            RedisConnectorHelper.SetCache<BankListDto, Bank>(AppConsts.Banks, banks, cache, o => o.Name);//set cache
            return new ListResultDto<BankListDto>(banks.OrderBy(o => o.Name).MapTo<List<BankListDto>>());
        }

Test method

BankAppServiceTests.cs

[Fact]
public async Task Test_GetAllBanksAsync()
 {
 //Act
var banks = await _bankAppService.GetAllBanksAsync();//here it shows over 7000+ records.which are on my db.But it must be just 4 records on the seed data no?

//Assert
banks.Items.ShouldContain(t => t.Name == "EquiCredit Corp of NY");
}

Seed method

namespace My.Company.Migrations.Seed
{
    public class InitialBanksCreator
    {
        private readonly IpDbContext _context;

        public InitialBanksCreator(IpDbContext context)
        {
            _context = context;
        }

        public void Create()
        {
            var object1 = _context.Banks.FirstOrDefault(p => p.Name == "EquiCredit Corp of NY");
            if (object1 == null)
            {
                _context.Banks.Add(
                    new Bank
                    {
                        Name = "EquiCredit Corp of NY",
                        TenantId = 2,
                    });
                _context.SaveChanges();
            }

            var object2 = _context.Banks.FirstOrDefault(p => p.Name == "Manufacturers & Traders Trust");
            if (object2 == null)
            {
                _context.Banks.Add(
                   new Bank
                   {
                       Name = "Manufacturers & Traders Trust",
                       TenantId = 2,
                   });
                _context.SaveChanges();
            }

            var object3 = _context.Banks.FirstOrDefault(p => p.Name == "Chemical Mtg Co");
            if (object3 == null)
            {
                _context.Banks.Add(
                   new Bank
                   {
                       Name = "Chemical Mtg Co",
                       TenantId = 2,
                   });
                _context.SaveChanges();
            }

            var object4 = _context.Banks.FirstOrDefault(p => p.Name == "Union Planters Bank");
            if (object4 == null)
            {
                _context.Banks.Add(
                   new Bank
                   {
                       Name = "Union Planters Bank",
                       TenantId = 2,
                   });
                _context.SaveChanges();
            }
        }
    }
}

Hi,

Yes, you're right.I'll redesign it using ICacheManager.Thanks a lot for the feedback :)

Showing 171 to 180 of 187 entries