public async Task <IActionResult> AddSampleSetsAsync() { try { SampleSets sampleSets = new SampleSets(); sampleSets.Name = Request.Form["name"]; sampleSets.Id = 0; string userId = Request.Form["userId"]; await _projectBL.AddSampleSetsAsync(sampleSets, int.Parse(userId)); //Log.Logger.Information($"new SampleSets with ID {sampleSets.Id} created"); return(CreatedAtAction("AddSampleSets", sampleSets)); } catch (Exception e) { Log.Logger.Error($"Error thrown: {e.Message}"); return(StatusCode(400)); } }