Beispiel #1
0
        public void Add(SchoolSubTypeDto schoolSubTypeDto)
        {
            var schoolSubType = new SchoolSubType()
            {
                Name         = schoolSubTypeDto.Name,
                SchoolTypeId = schoolSubTypeDto.SchoolTypeId
            };

            _schoolSubTypeRepository.Add(schoolSubType);
        }
Beispiel #2
0
        public static SchoolSubType Mapper(this SchoolSubTypeDto dto)
        {
            var model = new SchoolSubType();

            if (dto != null)
            {
                model.Id           = dto.Id;
                model.Name         = dto.Name;
                model.SchoolTypeId = dto.SchoolTypeId;
            }

            return(model);
        }
Beispiel #3
0
        public static SchoolSubTypeDto Mapper(this SchoolSubType schoolSubType)
        {
            var dto = new SchoolSubTypeDto();

            if (schoolSubType != null)
            {
                dto.Id             = schoolSubType.Id;
                dto.Name           = schoolSubType.Name;
                dto.SchoolTypeId   = schoolSubType.SchoolType.Id;
                dto.SchoolTypeName = schoolSubType.Name;
            }

            return(dto);
        }