Пример #1
0
            public static EfCourse MapDomainToEntity(Course domain)
            {
                var entity = new EfCourse();

                entity.Id   = domain.Id;
                entity.Name = domain.Name;
                return(entity);
            }
Пример #2
0
 public static Course MapEntityToDomain(EfCourse entity)
 {
     // TODO: Figure out how to share mappings, like here for org
     return(new Course(entity.Id, null, entity.CatalogNumber, entity.Name));
 }
Пример #3
0
 public static Course MapEntityToDomainForOrganization(EfCourse entity, Organization organization)
 {
     return(new Course(entity.Id, organization, entity.CatalogNumber, entity.Name));
 }