public static IActionResult GetExperienceById( [HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = "experience/{expId}")] HttpRequest req, [Table("aramizexperience", "experience", "{expId}", Connection = "AzureWebJobsStorage")] ExperienceEntity experienceTable, ILogger log, string expId) { log.LogInformation("Getting aramiz experience entity by id"); if (experienceTable == null) { log.LogInformation($"Experience entity {expId} not found"); return(new NotFoundResult()); } return(new OkObjectResult(experienceTable.ExperienceEntity())); }
public static ExperienceModel ExperienceEntity(this ExperienceEntity experience) { return(new ExperienceModel() { expId = experience.RowKey, expCreatedDate = experience.expCreatedDate, expModifiyDate = experience.expModifiyDate, expCompanyLogoUri = experience.expCompanyLogoUri, expEmployeeTitle = experience.expEmployeeTitle, expCompany = experience.expCompany, expLocation = experience.expLocation, expCurrentWorkRole = experience.expCurrentWorkRole, expStartDate = experience.expStartDate, expEndDate = experience.expEndDate, expWorkSubject = experience.expWorkSubject, expWorkDescription = experience.expWorkDescription, expWorkLinks = experience.expWorkLinks }); }