Example #1
0
        public static Fluorophore ToFluorophore(this FluorophoreEntity newEntity, Fluorophore oldEntity = null)
        {
            Fluorophore entity = oldEntity;

            if (entity == null)
            {
                entity = new Fluorophore();
            }
            entity.Name       = newEntity.Name;
            entity.Emission   = newEntity.Emission;
            entity.Absorption = newEntity.Absorption;
            entity.Class      = newEntity.Class;

            return(entity);
        }
Example #2
0
        public static FluorophoreEntity ToFluorophoreEntity(this Fluorophore model)
        {
            if (model == null)
            {
                return(null);
            }

            FluorophoreEntity entity = new FluorophoreEntity();

            entity.Id         = model.Id;
            entity.Name       = model.Name;
            entity.Emission   = model.Emission;
            entity.Absorption = model.Absorption;
            entity.Class      = model.Class;

            return(entity);
        }