public GenreWSDTO Translate(ControllerLayer.GenreDTO genre) { GenreWSDTO Output = new GenreWSDTO(); Output.GID = genre.GID; Output.GenreTitle = genre.GenreName; return(Output); }
public ControllerLayer.GenreDTO Translate(GenreWSDTO Genre) { if (Genre.GID != null || Genre.GenreTitle != null) { return(new ControllerLayer.GenreDTO((int)Genre.GID, Genre.GenreTitle)); } throw new System.Web.HttpRequestValidationException("Invalid Genre"); }