public void Update(MyEntity entity)
        {
            if (entity == null)
                throw new ArgumentNullException(nameof(entity));

            _repository.UpdateEntity(entity);
        }
Пример #2
0
        public void UpdateEntity(MyEntity entity)
        {
            if (entity == null)
                throw new ArgumentNullException(nameof(entity));

            _context.RepositoryFor<MyEntity>().Update(entity);
            _context.Commit();
        }
Пример #3
0
        public MyDemoDTO MapToDto(MyEntity entity)
        {
            if (entity == null)
                throw new ArgumentNullException(nameof(entity));

            MyDemoDTO dto = new MyDemoDTO();
            dto.Id = entity.Id;
            dto.LastName = entity.LastName;
            dto.Name = entity.Name;
            return dto;
        }
Пример #4
0
        public MyEntity MapToEntity(MyEntity entity, MyDemoDTO dto)
        {
            if (entity == null)
                throw new ArgumentNullException(nameof(entity));

            if (dto == null)
                throw new ArgumentNullException(nameof(dto));

            entity.Id = dto.Id;
            entity.LastName = dto.LastName;
            entity.Name = dto.Name;
            return entity;
        }
 public void UpdateEntity(MyEntity entity)
 {
 }
 public void DeleteEntity(MyEntity entity)
 {
     throw new NotImplementedException();
 }