Ejemplo n.º 1
0
        public List <DraftPlayerDomainModel> DraftPositionStatus(int SeasonID, int iDrafted)
        {
            List <DraftPlayerDomainModel> listPos = new List <DraftPlayerDomainModel>();

            using (CSBAAzureEntities context = new CSBAAzureEntities())
            {
                listPos = (from result in context.DraftPositionStatus(SeasonID) where result.Drafted == iDrafted
                           select new DraftPlayerDomainModel
                {
                    Drafted = result.Drafted,
                    PosCount = (int)result.PosCount,
                    PositionName = result.PositionName,
                    SeasonID = result.SeasonID
                }).ToList();
            } // Guaranteed to close the Connection

            return(listPos);
        }