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

Activities of "arslanali"

thanks hikalkan, you rock :) i knew there is a small silly mistake :$

Can I take a few more moments of yours and ask a question about another issue I posted earlier, but still struggling to understand what to do about the public users?

#1361

Actually its a big decision to make, I think i have 3 options:

  • I can create a PublicUser Entity and create a complete login/register logic for it and manage the sessions. (which seems very complicated and time consuming)
  • I can create a Tenant with a specific ID and handle its features, settings, pages etc. (which is also complicated)
  • I can create a separate application for PublicUsers with login and session management using ASP Net Boilerplate or buy another ASPNETZero license and create a single tenancy app and share database.

Please share your opinon. looking forward to your ideas. Arslan.

hi there, I know its a very basic question, however your help will be appreciated following is my code

[UnitOfWork]
public async Task<string> GetPictureById(Guid? Id, int fWidth, int fHeight)
{            
    using (CurrentUnitOfWork.SetTenantId(null))
    {
        if (Id.HasValue)
        {
            var file =await _binaryObjectManager.GetOrNullAsync(Id.Value);
            var filename = ImageResizer(file.Bytes, fWidth, fHeight, Id.Value);
            return filename;                    
        }
        else
        {
            return null;
        }
    }
            
}

Its in my MVC Controller Class. I even put [UnitOfWork] annotation on my method.

the code is breaking with null reference at using statement. I tried with UnitOfWorkManager.Current and even with _unitOfWorkManager.Current by dependency injection. though I know that by default it is available in controllers.

Well I can make use of another entity bUT what about the filters like IMusthave tenant, the abp framework for handling cookies and all. There will be no permissions requirement for now, but I will be saving basic user settings, a little transaction history, managing notifications and messages between the public users and tenant users and saving logs for capturing user experience.

Hi there, I want to create a public interface of the application where the public users (customers) can come and put up their inquiries. There will be different tenants (suppliers), and their users will be catering the public inquires. I want a little help here in customizing the abp and aspnetzero architecture.

Step1: How can i create an entity for public users. should i create it as host user and handle the default permissions? If so then i will have to allow creation of self host accounts, which is again an issue. should i create a default tenant and create all public users as users to this tenant and create different features or edition etc?

Step2: Can you share some common steps to convert the landing page area into a small Angular App so that public users can view their history related data. I want to utilize the Abp service injection to get and set data into db for public users.

Hi Hikalkan, well thanks for the previous replies as they really helped me managing my repositories and application services while keeping my code neat and clean. rite now i have another small issue, may be i am making a very basic mistake.

I have a repository container same as mentioned earlier.

Since my core classes are all relational, which means they have navigation objects of parent and navigation list of child in them. I am using Angular SPA which requires JSON objects and they cannot be circular referenced so to handle this i have made DTOs of all these Core classes but without the navigation objects which actually worked fine.

But now i have a complex scenario where i want to send a Complex DTO of a BusinessServices (table in db) with its Questions (Child Table) and Questions with its choices(Child of child). all of these tables are 1 to many in relationship. So i have made the DTOs as follows:

[MapTo]
[AutoMap(typeof(BusinessServices))]
public class AdminServiceCompleteDto : EntityDto, IDoubleWayDto
{
...... // Dto properties same as Core 
public ICollection<AdminQuestionsDto> questions {get;set;}
}
[AutoMap(typeof(Qualification))]
public class AdminQualificationDto: EntityDto,IDoubleWayDto
{
.....// Dto properties same as Core
public int ServiceId {get;set;}
public ICollection<AdminInputChoiceDto> mcqAnswers { get; set; } 
}
[AutoMap(typeof(CustomerInputChoice))]
public class AdminInputChoiceDto: EntityDto,IDoubleWayDto
{
.....// Dto properties same as Core
public int QuestionId {get;set;}
}

Now I send the AdminServiceCompleteDto object to Angular SPA which recieves it well and displays everything nicely.

But when i send the updated object back and try to update the same object then nothings gets updated. I tried following but nothing works:

Try1:

public AdminServiceCompleteDto SetServiceData(AdminServiceCompleteDto input)
        {
           
            var service = _adminBusinessServiceRepository.Get(input.Id);
            service = input.MapTo<BusinessServices>();
            return service.MapTo<AdminServiceCompleteDto>();
        }
// Result: Nothing gets updated.

Try 2:

public AdminServiceCompleteDto SetServiceData(AdminServiceCompleteDto input)
        {
            var service = _adminBusinessServiceRepository.InsertOrUpdate(input.MapTo<BusinessServices>());
            return service.MapTo<AdminServiceCompleteDto>();
        }
// Result: Nothing gets updated.

Try 3:

public AdminServiceCompleteDto SetServiceData(AdminServiceCompleteDto input)
        {
            BusinessServices service = new BusinessServices();
            if (input.Id > 0)
            {
                service = _adminDataRepositories._businessServicesRepository.Get(input.Id);
                service = input.MapTo<BusinessServices>();
                CurrentUnitOfWork.SaveChanges();

                var qualifications = input.qualification.MapTo<List<Qualification>>();
                foreach (var q in input.qualification)
                {
                    q.bServId = service.Id;
                    var question = _adminDataRepositories._qualificationRepository.InsertOrUpdate(q.MapTo<Qualification>()); // program break here
                     foreach (var a in q.mcqAnswers)
                    {
                        a.qualificationId = question.Id;
                        _adminDataRepositories._customerInputChoiceRepository.InsertOrUpdate(a.MapTo<CustomerInputChoice>());
                    }
                }

            }
            else
                service =_adminDataRepositories._businessServicesRepository.Insert(input.MapTo<BusinessServices>());

            return service.MapTo<AdminServiceCompleteDto>();
        }
// This gives runtime error but with no data.

But it works if i bring earch DTO serperately and save them individually. Which is lengthy and cumbersome :( i would appreciate if you could give me a quick and easy process for the above problem. Arslan.

Answer

hey, Thankyou for sharing, its worth appreciating

Question

Hi, Can you please tell me how to upload an images and displayed them as a gallery !

Question

hi there, can you please tell us know the exact release dates for the Roadmap Features, especially the Angular 2 upgrade and the email+chat features.

regards,

sorry but its not happening help me, review my code please: Definition:

public interface ISupplierRepositoriesContainer: ITransientDependency
    {
        ISupplierProfileRepository _supplierProfileRepository { get; }
        ISupplierBusnsServicesRepository _supplierBusnsServicesRepository { get; }
        ISupplierBusnsCoverageRepository _supplierBusnsCoverageRepository { get; }
        ISupplierPhotosRepository _supplierPhotosRepository { get; }
        ISupplierVideosRepository _supplierVideosRepository { get; }
        ISupplierCertificationsRepository _supplierCertificationRepository { get;}
        ISupplierLeadsRepository _supplierLeadsRepository { get; }
    }

Implementation:

class SupplierRepositoryContainer: ISupplierRepositoriesContainer, ITransientDependency
    {
        public ISupplierProfileRepository _supplierProfileRepository { get; }
        public ISupplierBusnsServicesRepository _supplierBusnsServicesRepository { get; }
        public ISupplierBusnsCoverageRepository _supplierBusnsCoverageRepository { get; }
        public ISupplierPhotosRepository _supplierPhotosRepository { get; }
        public ISupplierVideosRepository _supplierVideosRepository { get; }
        public ISupplierCertificationsRepository _supplierCertificationRepository { get; }
        public ISupplierLeadsRepository _supplierLeadsRepository { get; }

    }

When i try to make an application service object like below, i dont get intellisense:

var _profileService = abp.services.app.profile;

when i type abp. i get everything but the services. Please tell me which files to include in my js references file?

Showing 1 to 10 of 17 entries