public async Task <Guid> AddAsync(AddActorDto addActor) { var newActor = new Person(addActor.Name, addActor.LastName); await _ctx.Actors.AddAsync(newActor); await _ctx.SaveChangesAsync(); return(newActor.Id); }
public async Task <Guid> AddAsync(AddMovieDto movie) { var newMovie = new Movie(movie.Title) { Description = movie.Description }; await _ctx.Movies.AddAsync(newMovie); await _ctx.SaveChangesAsync(); return(newMovie.Id); }