Exemplo n.º 1
0
        public void ArmyModelCreate(ArmyModelBLL Record)
        {        //creates a single record in the many to many (ArmyModels) table
            ArmyModelDAL NewRecord = new ArmyModelDAL();

            NewRecord = Record.ToDAL();
            _context.ArmyModelCreate(NewRecord);
        }
Exemplo n.º 2
0
        public ArmyModelBLL ArmyModelsFindByArmyIDAndModelID(int ArmyID, int ModelID)
        {        //grabs a single record from out many to many (ArmyModels) table
            ArmyModelDAL item        = _context.ArmyModelsFindByArmyIDAndModelID(ArmyID, ModelID);
            ArmyModelBLL ReturnValue = new ArmyModelBLL(item);

            return(ReturnValue);
        }
Exemplo n.º 3
0
        public List <ArmyModelBLL> ArmyModelsFindByArmyID(int ArmyID, int Skip, int Take)
        {        // grabs a list of models that are included in given army by armyID
            List <ArmyModelBLL> ReturnValue = new List <ArmyModelBLL>();
            List <ArmyModelDAL> items       = _context.ArmyModelsFindByArmyID(ArmyID, Skip, Take);

            foreach (ArmyModelDAL item in items)
            {
                ArmyModelBLL NewItem = new ArmyModelBLL(item);
                ReturnValue.Add(NewItem);
            }
            return(ReturnValue);
        }
Exemplo n.º 4
0
        public List <ArmyModelBLL> ArmyModelsFindByFactionID(int ArmyID, int FactionID, int Skip, int Take)
        {        //we use this to create a list of models we can add to our army. this is a mix of ArmyModel and
            // models tables including QTY of models in army and how many full squats.
            List <ArmyModelBLL> ReturnValue = new List <ArmyModelBLL>();
            List <ArmyModelDAL> items       = _context.ArmyModelsFindByFactionID(ArmyID, FactionID, Skip, Take);

            foreach (ArmyModelDAL item in items)
            {            // adding info to the list by feeding DAL to BLL constructor
                ArmyModelBLL NewItem = new ArmyModelBLL(item);
                ReturnValue.Add(NewItem);
            }
            return(ReturnValue);
        }