public override Taxon ToDomainEntity(tblTaxon dataEntity)
        {
            var ret = new Taxon();

            ret.Cultivar   = dataEntity.Cultivar;
            ret.Genus      = _genusTranslator.ToDomainEntity(dataEntity.tblGenus);
            ret.Id         = dataEntity.Id;
            ret.Species    = dataEntity.Species;
            ret.SubSpecies = dataEntity.SubSpecies;
            ret.Variety    = dataEntity.Variety;
            ret.Forma      = dataEntity.Forma;
            return(ret);
        }
Example #2
0
        public bool Read()
        {
            var entity = _context.tblCollectionItemImage
                         .Where(x => !x.SharedOnInstagram)
                         .OrderByDescending(x => x.tblCollectionItem.tblTaxon.tblGenusId)
                         .Skip(_skiped)
                         .Take(1)
                         .SingleOrDefault();

            if (entity == null)
            {
                return(false);
            }
            _skiped++;
            Value = _translator.ToDomainEntity(entity);
            return(true);
        }
        public override CollectionItem ToDomainEntity(tblCollectionItem entity)
        {
            var ret = new CollectionItem();

            ret.Code         = entity.Code;
            ret.Collector    = _collectorTranslator.ToDomainEntity(entity.tblCollector);
            ret.Count        = entity.Count;
            ret.Description  = entity.Description;
            ret.FieldNumber  = entity.FieldNumber;
            ret.Id           = entity.Id;
            ret.IncomeDate   = entity.IncomeDate;
            ret.IncomeType   = (IncomeType)entity.IncomeType;
            ret.Locality     = entity.Locality;
            ret.Supplier     = _supplierTranslator.ToDomainEntity(entity.tblSupplier);
            ret.Taxon        = _taxonTranslator.ToDomainEntity(entity.tblTaxon);
            ret.SupplierCode = entity.SupplierCode;
            return(ret);
        }
        public Supplier Get(Guid id)
        {
            var entity = _context.tblSupplier.Find(id);

            return(_translator.ToDomainEntity(entity));
        }
Example #5
0
        public Collector Get(Guid id)
        {
            var entity = _context.tblCollector.Find(id);

            return(_translator.ToDomainEntity(entity));
        }
        public Taxon Get(Guid id)
        {
            var entity = _context.tblTaxon.Find(id);

            return(_translator.ToDomainEntity(entity));
        }
        public Genus Get(Guid id)
        {
            var entity = _context.tblGenus.Find(id);

            return(_translator.ToDomainEntity(entity));
        }
        public CollectionItem Get(Guid id)
        {
            var entity = _context.tblCollectionItem.AsNoTracking().Single(x => x.Id == id);

            return(_translator.ToDomainEntity(entity));
        }