public static internalDTO.AppUserInPosition MapFromExternal(externalDTO.AppUserInPosition appUserInPosition)
        {
            var res = appUserInPosition == null ? null : new internalDTO.AppUserInPosition
            {
                Id                = appUserInPosition.Id,
                AppUserId         = appUserInPosition.AppUserId,
                AppUser           = AppUserMapper.MapFromExternal(appUserInPosition.AppUser),
                AppUserPositionId = appUserInPosition.AppUserPositionId,
                AppUserPosition   = AppUserPositionMapper.MapFromExternal(appUserInPosition.AppUserPosition),
                From              = appUserInPosition.From,
                Until             = appUserInPosition.Until
            };

            return(res);
        }
        public static internalDTO.UserOnAddress MapFromExternal(externalDTO.UserOnAddress userOnAddress)
        {
            var res = userOnAddress == null ? null : new internalDTO.UserOnAddress
            {
                Id        = userOnAddress.Id,
                Start     = userOnAddress.Start,
                End       = userOnAddress.End,
                AddressId = userOnAddress.AddressId,
                AppUserId = userOnAddress.AppUserId,
                Address   = AddressMapper.MapFromExternal(userOnAddress.Address),
                AppUser   = AppUserMapper.MapFromExternal(userOnAddress.AppUser)
            };

            return(res);
        }
Exemple #3
0
        public static internalDTO.Identification MapFromExternal(externalDTO.Identification identification)
        {
            var res = identification == null ? null : new internalDTO.Identification
            {
                Id        = identification.Id,
                DocNumber = identification.DocNumber,
                Start     = identification.Start,
                End       = identification.End,
                Comment   = identification.Comment,
                AppUserId = identification.AppUserId,
                AppUser   = AppUserMapper.MapFromExternal(identification.AppUser)
            };

            return(res);
        }
Exemple #4
0
        public static internalDTO.Review MapFromExternal(externalDTO.Review review)
        {
            var res = review == null ? null : new internalDTO.Review
            {
                Id               = review.Id,
                Rating           = review.Rating,
                ReviewComment    = review.ReviewComment,
                ReviewGiverId    = review.ReviewGiverId,
                ReviewReceiverId = review.ReviewReceiverId,
                ReviewGiver      = AppUserMapper.MapFromExternal(review.ReviewGiver),
                ReviewReceiver   = AppUserMapper.MapFromExternal(review.ReviewReceiver)
            };

            return(res);
        }
        public static internalDTO.Comment MapFromExternal(externalDTO.Comment comment)
        {
            var res = comment == null ? null : new internalDTO.Comment
            {
                Id           = comment.Id,
                Timestamp    = DateTime.UtcNow,
                CommentValue = comment.CommentValue,
                FoodItemId   = comment.FoodItemId,
                AppUserId    = comment.AppUserId,
                AppUser      = AppUserMapper.MapFromExternal(comment.AppUser)
            };


            return(res);
        }
        public static externalDTO.Comment MapFromBLL(internalDTO.Comment comment)
        {
            var res = comment == null ? null : new externalDTO.Comment
            {
                Id           = comment.Id,
                Timestamp    = comment.Timestamp,
                CommentValue = comment.CommentValue,
                FoodItemId   = comment.FoodItemId,
                AppUserId    = comment.AppUserId,
                AppUser      = AppUserMapper.MapFromBLL(comment.AppUser)
            };


            return(res);
        }
Exemple #7
0
        public static internalDTO.UserSkill MapFromExternal(externalDTO.UserSkill userSkill)
        {
            var res = userSkill == null ? null : new internalDTO.UserSkill
            {
                Id        = userSkill.Id,
                Start     = userSkill.Start,
                End       = userSkill.End,
                SkillId   = userSkill.SkillId,
                AppUserId = userSkill.AppUserId,
                Skill     = SkillMapper.MapFromExternal(userSkill.Skill),
                AppUser   = AppUserMapper.MapFromExternal(userSkill.AppUser)
            };

            return(res);
        }
        public static internalDTO.AppUserOnObject MapFromExternal(externalDTO.AppUserOnObject appUserOnObject)
        {
            var res = appUserOnObject == null ? null : new internalDTO.AppUserOnObject
            {
                Id           = appUserOnObject.Id,
                AppUserId    = appUserOnObject.AppUserId,
                AppUser      = AppUserMapper.MapFromExternal(appUserOnObject.AppUser),
                WorkObjectId = appUserOnObject.WorkObjectId,
                WorkObject   = WorkObjectMapper.MapFromExternal(appUserOnObject.WorkObject),
                From         = appUserOnObject.From,
                Until        = appUserOnObject.Until
            };

            return(res);
        }
Exemple #9
0
        public static internalDTO.UserTask MapFromExternal(externalDTO.UserTask userTask)
        {
            var res = userTask == null ? null : new internalDTO.UserTask
            {
                Id          = userTask.Id,
                Start       = userTask.Start,
                End         = userTask.End,
                TaskId      = userTask.TaskId,
                TaskGiverId = userTask.TaskGiverId,
                TaskerId    = userTask.TaskerId,
                TaskerTask  = TaskerTaskMapper.MapFromExternal(userTask.TaskerTask),
                TaskGiver   = AppUserMapper.MapFromExternal(userTask.TaskGiver),
                Tasker      = AppUserMapper.MapFromExternal(userTask.Tasker)
            };

            return(res);
        }
Exemple #10
0
        public static internalDTO.Invoice MapFromExternal(externalDTO.Invoice invoice)
        {
            var res = invoice == null ? null : new internalDTO.Invoice
            {
                Id              = invoice.Id,
                InvoiceNumber   = invoice.InvoiceNumber,
                Date            = invoice.Date,
                TotalWithVAT    = invoice.TotalWithVAT,
                TotalWithoutVAT = invoice.TotalWithoutVAT,
                VAT             = invoice.VAT,
                Comment         = invoice.Comment,
                AppUserId       = invoice.AppUserId,
                AppUser         = AppUserMapper.MapFromExternal(invoice.AppUser),
            };

            return(res);
        }