예제 #1
0
        public static MvcCategory GetMVCEntity(BLLCategory category)
        {
            MvcCategory res = new MvcCategory()
            {
                Id   = category.Id,
                Name = category.Name
            };

            foreach (var sphere in category.Sphere)
            {
                res.Sphere.Add(SphereMapper.GetMVCEntity(sphere));
            }
            return(res);
        }
예제 #2
0
        public static BLLCategory GetBLLEntity(MvcCategory category)
        {
            BLLCategory result = new BLLCategory()
            {
                Id   = category.Id,
                Name = category.Name,
            };

            foreach (var sphere in category.Sphere)
            {
                result.Sphere.Add(SphereMapper.GetBLLEntity(sphere));
            }
            return(result);
        }