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

Activities of "jamsecgmbh"

Question

Hi, what is best practise in a SPA to pass a parameter to another page?

I need to pass the ID of a project to a details page with a button click in the list of projects. The ID should be used to filter project details, set the page heading, etc..

Thank you very much!

You are right - it works, I am sorry - it was just bad database permission. Thank you very much!

Hi, how can I insert data into two entities which depend on each other (Applicant has foreign key in JobApplication) and where the data is passed in one save action? I have tried to use "applicantId = _applicantRepository.InsertAndGetId(applicant);" to insert the Applicant first, get the ID of the entry and pass it to the method that inserts the JobApplication. I run into an error there. Could you please tell me how to do it right? Thank you!

public class JobApplicationAppService : JobApplicationDatabaseAppServiceBase, IJobApplicationAppService
{
	private readonly IRepository<JobApplication, long> _jobApplicationRepository;
	private readonly IRepository<Applicant, long> _applicantRepository;

	public JobApplicationAppService(IRepository<JobApplication, long> jobApplicationRepository, IRepository<Applicant, long> applicantRepository)
	{
		_jobApplicationRepository = jobApplicationRepository;
		_applicantRepository = applicantRepository;
	}

	public async Task CreateOrUpdateJobApplication(CreateOrUpdateJobApplicationInput input)
	{
		if (input.JobApplication.Id.HasValue)
		{
			// implement
		}
		else
		{
			var applicantId = CreateApplicant(input);
			CreateJobApplication(input, applicantId);
		}
	}

	[AbpAuthorize(AppPermissions.Pages_Tenant_JobApplications_CreateJobApplication)]
	protected virtual long CreateApplicant(CreateOrUpdateJobApplicationInput input)
	{
		long applicantId;
		// Create applicant first and then pass the new ID to the jobApplication
		var applicant = input.Applicant.MapTo<Applicant>();
		applicantId = _applicantRepository.InsertAndGetId(applicant);
		return applicantId;
	}		

	[AbpAuthorize(AppPermissions.Pages_Tenant_JobApplications_CreateJobApplication)]
	protected virtual void CreateJobApplication(CreateOrUpdateJobApplicationInput input, long applicantId)
	{
		input.Applicant.Id = applicantId;
		var jobApplication = input.Applicant.MapTo<Applicant>();
	}
}

Thanks! I hope this will be implemented soon - it would be a great feature.

Hi,

how can we handle concurrency concerning database operations within the application safe and easily?
We need to detect that two or more users are changing the same datasets and warn them.

Thank you very much!

Thank you!

How can I create a foreign key pointing to the id of an user in the user table?

[Table("DbAppTesttable")]
public class Testtable : FullAuditedEntity&lt;long&gt;, IMustHaveTenant
{
    // Foreign Key: ID of User
    [ForeignKey("User ...
    ...
}

Dear ASP.NET Boilerplate Support,

I want to use data from the User table in my code - how can I make it accessible? Do I need to create an IDbSet manually in the DbContext class?

Thank you very much and best regards Chris

Showing 31 to 37 of 37 entries