コード例 #1
0
        public ProcedureEntity ConvertToEntity(ProcedureModel entity)
        {
            if (entity == null)
                return null;

            var model = new ProcedureEntity(entity.Id);
            model.MaxTime = entity.MaxTime;
            model.PaymentPerHour = entity.PaymentPerHour;
            model.Name = entity.Name;
            model.Description = entity.Description;
            return model;
        }
コード例 #2
0
        public async Task<ProcedureModel> ConvertToModel(ProcedureEntity entity)
        {
            if (entity == null)
                return null;

            var model = new ProcedureModel(entity.Id);
            model.MaxTime = entity.MaxTime;
            model.PaymentPerHour = entity.PaymentPerHour;

            model.Name = model.Name;
            model.Description = model.Description;

            model.ProcedureEntries = await ProcedureEntryRepository.Instance.GetProcedureEntriesByProcedureId(entity.Id);

            return model;
        }