예제 #1
0
        public bool SaveUnit(UnitDto unitDetails)
        {
            this.unit = unitDetails.DtoToEntity();
            if (this._unit.Insert(this.unit).IsNull())
            {
                return(false);
            }

            return(true);
        }
예제 #2
0
        public static IOBalanceEntity.Unit DtoToEntity(this UnitDto dto)
        {
            IOBalanceEntity.Unit entity = null;

            if (!dto.IsNull())
            {
                entity = new IOBalanceEntity.Unit()
                {
                    UnitDesc = dto.UnitDesc
                };
            }

            return(entity);
        }
예제 #3
0
        public UnitService(IIOBalanceRepository <Unit> unit)
        {
            this._unit = unit;

            this.unit = new IOBalanceEntity.Unit();
        }