Ejemplo n.º 1
0
        public List <v_PlayerPositionDomainModel> ListPlayerPositionSeason(int SeasonID, int PositionID, bool bDrafted)
        {
            //Create a return type Object
            List <v_PlayerPositionDomainModel> list = new List <v_PlayerPositionDomainModel>();

            using (CSBAAzureEntities context = new CSBAAzureEntities())
            {
                list = (from result in context.DraftPlayersStatus(SeasonID, PositionID, bDrafted)
                        select new v_PlayerPositionDomainModel
                {
                    PlayerGUID = result.PlayerGUID,
                    PlayerImage = result.PlayerImage,
                    PlayerName = result.PlayerName,
                    PrimaryPositionID = result.PrimaryPositionID,
                }).ToList();
            } // Guaranteed to close the Connection

            return(list);
        }