public async Task CreateBreed(CreateBreedFormViewModel breedModel) { Breed newBreed = new Breed() { Name = breedModel.Name, }; context.Add(newBreed); await context.SaveChangesAsync(); }
public async Task <IActionResult> Create(CreateBreedFormViewModel breedModel) { await breedService.CreateBreed(breedModel); return(Redirect("/Breeds/All")); }