Beispiel #1
0
 public static void CopyFieldsTo(this DalBlog source, Blog target)
 {
     if (source == null)
     {
         throw new ArgumentNullException("source");
     }
     if (target == null)
     {
         throw new ArgumentNullException("target");
     }
     target.Title = source.Title;
 }
Beispiel #2
0
        public static Blog ToModel(this DalBlogEntity item)
        {
            if (item == null)
                return null;

            Blog blogEntity = new Blog
            {
                Id = item.Id,
                Name = item.Name,
                UserId = item.User.Id
            };
            return blogEntity;
        }