Beispiel #1
0
        public void ModelUpdate(ModelBLL ModelToEdit)
        {
            ModelDAL Model = new ModelDAL();

            Model = ModelToEdit.ToDAL();
            _context.ModelUpdate(Model);
        }
Beispiel #2
0
        public int ModelCreate(ModelBLL InputModel)
        {
            ModelDAL Model = new ModelDAL();

            Model = InputModel.ToDAL();
            return(_context.ModelCreate(Model));
        }
Beispiel #3
0
        public ModelBLL ModelFindByID(int ModelID)
        {        //finding a model by it's ID
            ModelBLL ReturnValue = null;
            ModelDAL item        = _context.ModelFindByID(ModelID);

            if (item != null)
            {
                ReturnValue = new ModelBLL(item);
            }
            return(ReturnValue);
        }
Beispiel #4
0
        public List <ModelBLL> ModelsFindByFactionID(int FactionID, int Skip, int Take)
        {        // finding all models of a certain faction, skip/take is for future paging
            List <ModelBLL> ReturnValue = new List <ModelBLL>();
            List <ModelDAL> items       = _context.ModelsFindByFactionID(FactionID, Skip, Take);

            foreach (ModelDAL item in items)
            {
                ModelBLL NewItem = new ModelBLL(item);
                ReturnValue.Add(NewItem);
            }
            return(ReturnValue);
        }
Beispiel #5
0
        public List <ModelBLL> ModelsGetAll(int skip, int take)
        {        // skip/take are for future paging
            List <ModelBLL> ReturnValue = new List <ModelBLL>();
            List <ModelDAL> items       = _context.ModelsGetAll(skip, take);

            foreach (ModelDAL item in items)
            {
                ModelBLL NewItem = new ModelBLL(item);
                ReturnValue.Add(NewItem);
            }
            return(ReturnValue);
        }