Пример #1
0
        public static IOBalanceDBV2Entity.Category DtoToEntity(this CategoryDto dto)
        {
            IOBalanceDBV2Entity.Category entity = null;

            if (!dto.IsNull())
            {
                entity = new IOBalanceDBV2Entity.Category
                {
                    CategoryID   = dto.CategoryId,
                    CategoryName = dto.CategoryName
                };
            }

            return(entity);
        }
Пример #2
0
        public static IOBalanceEntity.Category DtoToEntity(this CategoryDto dto)
        {
            IOBalanceEntity.Category entity = null;

            if (!dto.IsNull())
            {
                entity = new IOBalanceEntity.Category
                {
                    CategoryCode = dto.CategoryCode.Trim(),
                    CategoryName = dto.CategoryName.Trim(),
                    CategoryID   = dto.CategoryID,
                    IsActive     = true,
                    SortOrder    = 0
                };
            }

            return(entity);
        }