Example #1
0
        public SelfCheck AddSelfCheck(SelfCheck selfCheck)
        {
            var selfCheckDb       = ToSelfCheckDb(selfCheck);
            var selfCheckDbWithId = repository.Add(selfCheckDb);

            return(ToSelfCheck(selfCheckDbWithId));
        }
Example #2
0
        static SelfCheckDb ToSelfCheckDb(SelfCheck selfCheck)
        {
            var selfCheckDb = new SelfCheckDb();

            selfCheckDb.Id                  = selfCheck.ID;
            selfCheckDb.TrainingDbId        = selfCheck.TrainingID;
            selfCheckDb.ResponsiblePersonId = selfCheck.ResponsiblePersonID;
            selfCheckDb.Date                = selfCheck.Date;
            return(selfCheckDb);
        }
Example #3
0
        static SelfCheck ToSelfCheck(SelfCheckDb selfCheckDb)
        {
            var selfCheck = new SelfCheck();

            selfCheck.ID                  = selfCheckDb.Id;
            selfCheck.TrainingID          = selfCheckDb.TrainingDbId;
            selfCheck.ResponsiblePersonID = selfCheckDb.ResponsiblePersonId;
            selfCheck.Date                = selfCheckDb.Date;
            return(selfCheck);
        }
Example #4
0
        public void UpdateSelfCheck(SelfCheck selfCheck)
        {
            var selfCheckDb = ToSelfCheckDb(selfCheck);

            repository.Update(selfCheckDb);
        }
Example #5
0
        public void RemoveSelfCheck(SelfCheck selfCheck)
        {
            var selfCheckDb = ToSelfCheckDb(selfCheck);

            repository.Delete(selfCheckDb);
        }