/// <summary> /// Functio static to Convert an object Movie from Client to API ShortfMovie /// </summary> /// <param name="movie">Client MovieCasting</param> /// <returns>API ShortfMovie</returns> public static AP.Movi.ShortMovie ToApi(this SEV.Movie movie) { if (movie == null) { return(null); } return(new AP.Movi.ShortMovie { Id = movie.Id, Title = movie.Title, Synopsis = movie.Synopsis, YearRelease = movie.YearRelease }); }
/// <summary> /// Mapping to Dal Movie from Sev.NewMovie /// </summary> /// <param name="entity">SEV.Movie</param> /// <returns>Dal Movie</returns> public static DAL.Entities.Movie ToDal(this SEV.Movie entity) { if (entity == null) { return(null); } return(new DAL.Entities.Movie() { Id = entity.Id, Title = entity.Title, Synopsis = entity.Synopsis, YearRelease = entity.YearRelease, Director = entity.Director, Writer = entity.Writer }); }