public static internalDTO.ContactType MapFromDAL(externalDTO.ContactType contactType)
        {
            var res = contactType == null ? null : new internalDTO.ContactType()
            {
                Id = contactType.Id,
                ContactTypeValue = new internalDTO.MultiLangString(contactType.ContactTypeValue)
            };

            return(res);
        }
        public static BLL.App.DTO.ContactType MapFromDAL(internalDTO.ContactType contactType)
        {
            var res = contactType == null ? null : new BLL.App.DTO.ContactType()
            {
                Id = contactType.Id,
                ContactTypeValue = contactType.ContactTypeValue
            };

            return(res);
        }
예제 #3
0
        public override ContactType Update(ContactType entity)
        {
            var entityInDb = RepositoryDbSet
                             .Include(m => m.ContactTypeValue)
                             .ThenInclude(t => t.Translations)
                             .FirstOrDefault(x => x.Id == entity.Id);

            entityInDb.ContactTypeValue.SetTranslation(entity.ContactTypeValue);

            return(entity);
        }