public async Task <IActionResult> Create(ApiInterfaceCreateModel model) { if (!ModelState.IsValid) { return(View(model)); } var apiInterfaceEntity = _mapper.Map <ApiInterface>(model); await _mockServerNoSqlRepository.AddAsync(apiInterfaceEntity); var filter = Builders <ApiInterface> .Filter.Where(x => x.Category == model.Category && x.RequestPath == model.RequestPath); var addedApiInterface = await _mockServerNoSqlRepository.SearchOneAsync(filter); return(RedirectToAction(nameof(Test), new { id = addedApiInterface.Sysid.ToString() })); }
public IActionResult Create() { var model = new ApiInterfaceCreateModel(); return(View(model)); }