示例#1
0
        public async Task <List <CastResponseModel> > GetFirst10Cast()
        {
            var casts = await _castRepository.GetFirst10Casts();

            var first10Casts = new List <CastResponseModel>();

            foreach (var cast in casts)
            {
                first10Casts.Add(new CastResponseModel
                {
                    Id          = cast.Id,
                    Name        = cast.Name,
                    Gender      = cast.Gender,
                    TmdbUrl     = cast.TmdbUrl,
                    ProfilePath = cast.ProfilePath
                });
            }
            return(first10Casts);
        }