Exemplo n.º 1
0
        public List <v_PlayerPositionDomainModel> ListDraftPlayers()
        {
            //Create a return type Object
            List <v_PlayerPositionDomainModel> list = new List <v_PlayerPositionDomainModel>();

            using (CSBAAzureEntities context = new CSBAAzureEntities())
            {
                list = (from result in context.sp_PlayerPosition_Select(null)
                        select new v_PlayerPositionDomainModel
                {
                    PlayerGUID = result.PlayerGUID,
                    PlayerImage = result.PlayerImage,
                    PlayerName = result.PlayerName,
                    PrimaryPositionID = result.PrimaryPositionID,
                    SecondaryPostiionID = result.SecondaryPostiionID,
                    PrimPosName = result.PrimPosName,
                    PrimPosNameLong = result.PrimPosNameLong,
                    SecPosName = result.SecPosName,
                    SecPosNameLong = result.SecPosNameLong
                }).ToList();
            } // Guaranteed to close the Connection

            return(list);
        }