public JobPostViewModel(JobPosts jobPosts, CustomMap map) { activityIndicator = JobPosts.Instance.Content.FindByName <ActivityIndicator>("aiJobPost"); mapJob = map; LoadItemsCommand = new Command(async() => await ExecuteLoadItemsCommand()); LoadItemsCommand.Execute(null); }
public async Task CreateAsync(string title, string content, int jobCategoryId, string userId) { var jobpost = new JobPosts { Title = title, Content = content, JobCategoryId = jobCategoryId, UserId = userId, }; await this.jobpostsrepo.AddAsync(jobpost); await this.jobpostsrepo.SaveChangesAsync(); }