public int CreateScore(ScoreBLL score)
        {
            int ProposedReturnValue = -1;

            ProposedReturnValue = _context.CreateScore(score.Score, score.UserID, score.GameID);
            return(ProposedReturnValue);
        }
        public ScoreBLL FindScoreByScoreID(int ScoreID)
        {
            ScoreBLL ProposedReturnValue = null;
            ScoreDAL DataLayerObject     = _context.FindScoreByScoreID(ScoreID);

            if (null != DataLayerObject)
            {
                ProposedReturnValue = new ScoreBLL(DataLayerObject);
            }
            return(ProposedReturnValue);
        }
        public List <ScoreBLL> GetScoresReltatedToUserID(int UserID, int skip, int take)
        {
            List <ScoreBLL> ProposedReturnValue    = new List <ScoreBLL>();
            List <ScoreDAL> ListOfDataLayerObjects = _context.GetScoresRelatedToUserID(UserID, skip, take);

            foreach (ScoreDAL score in ListOfDataLayerObjects)
            {
                ScoreBLL BusinessObject = new ScoreBLL(score);
                ProposedReturnValue.Add(BusinessObject);
            }
            return(ProposedReturnValue);
        }
 public ActionResult Edit(int id, BusinessLogicLayer.ScoreBLL collection)
 {
     try
     {
         if (!ModelState.IsValid)
         {
             return(View(collection));
         }
         // TODO: Add update logic here
         using (ContextBLL ctx = new ContextBLL())
         {
             ctx.UpdateScore(collection);
         }
         return(RedirectToAction("Index"));
     }
     catch (Exception ex)
     {
         ViewBag.Exception = ex;
         return(View("Error"));
     }
 }
 public void DeleteScore(ScoreBLL score)
 {
     _context.DeleteScore(score.ScoreID);
 }
 public void UpdateScore(ScoreBLL score)
 {
     _context.UpdateScore(score.ScoreID, score.Score, score.UserID, score.GameID);
 }