示例#1
0
 public static MovieGenreDmo ShowMovieGenre(MovieGenreEntity dto)
 {
     return(new MovieGenreDmo()
     {
         Id = dto.Id,
         Name = dto.Name,
     });
 }
示例#2
0
        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);
        }
示例#3
0
 public object Save(MovieGenreEntity entity)
 {
     context.MovieGenre.Add(entity);
     context.SaveChanges();
     return(entity);
 }