Beispiel #1
0
        public bool SaveModel(ModelDto modelDetails)
        {
            this.model = modelDetails.DtoToEntity();

            if (this._model.Insert(this.model).IsNull())
            {
                return(false);
            }
            return(true);
        }
        public static IOBalanceEntity.Model DtoToEntity(this ModelDto dto)
        {
            IOBalanceEntity.Model entity = null;

            if (!dto.IsNull())
            {
                entity = new IOBalanceEntity.Model
                {
                    ModelID   = dto.ModelID,
                    ModelName = dto.ModelName
                };
            }

            return(entity);
        }
Beispiel #3
0
 public ModelService(IIOBalanceRepository <Model> model)
 {
     this._model = model;
     this.model  = new IOBalanceEntity.Model();
 }