public AlbumHelper(API.LABURNUM.COM.Album album) { if (album == null) { throw new Exception(API.LABURNUM.COM.Component.Constants.ERRORMESSAGES.PARAMETER_CANNOT_BE_NULL); } ; this.Albums = new List <API.LABURNUM.COM.Album>(); this.Albums.Add(album); }
private DTO.LABURNUM.COM.AlbumModel MapCore(API.LABURNUM.COM.Album apiAlbum) { DTO.LABURNUM.COM.AlbumModel dtoClass = new DTO.LABURNUM.COM.AlbumModel() { AlbumId = apiAlbum.AlbumId, AlbumName = apiAlbum.AlbumName, AlbumCoverImage = apiAlbum.AlbumCoverImage, AddedById = apiAlbum.AddedById, UpdatedById = apiAlbum.UpdatedById, UpdatedByName = apiAlbum.UpdatedById != null ? apiAlbum.Faculty1.FacultyName : "", AddedByName = apiAlbum.Faculty.FacultyName, AlbumDetails = new AlbumDetailHelper(apiAlbum.AlbumDetails.Where(x => x.IsActive == true).ToList()).Map(), CreatedOn = apiAlbum.CreatedOn, IsActive = apiAlbum.IsActive, LastUpdated = apiAlbum.LastUpdated }; return(dtoClass); }