public static MovieGenreDmo ShowMovieGenre(MovieGenreEntity dto) { return(new MovieGenreDmo() { Id = dto.Id, Name = dto.Name, }); }
public bool Update(int id, MovieGenreEntity Entity) { var data = FindById(id); if (data == null) { // throw not found response << blum tau caranya return(false); } data.Name = Entity.Name; context.SaveChanges(); return(true); }
public object Save(MovieGenreEntity entity) { context.MovieGenre.Add(entity); context.SaveChanges(); return(entity); }