public async Task <Studio> CreateStudio(StudioToPost studioToPost) { var addStudio = new Studio { Name = studioToPost.Name, City = studioToPost.City, State = studioToPost.State }; _context.Studios.Add(addStudio); await _context.SaveChangesAsync(); return(addStudio); }
public async Task <IActionResult> CreateStudio([FromBody] StudioToPost studio) { var result = await _studioRepository.CreateStudio(studio); return(Ok(result)); }