public UEntity MapToOrm(IDalSelectedEntity entity)
 {
     return(new UEntity
     {
         id = entity.Id,
         entity_id = entity.Entity_id,
         lib_id = entity.Lib_id
     });
 }
        public void Update(IDalSelectedEntity entity)
        {
            var ormEntity = context.Set <SelectedUser>().Find(entity.Id);

            if (ormEntity != null)
            {
                context.Entry(ormEntity).CurrentValues.SetValues(mapper.MapToOrm((DalSelectedUser)entity));
            }
        }
        public IBllSelectedEntity <UEntity> MapToBll(IDalSelectedEntity entity)
        {
            UService EntityService = (UService)Activator.CreateInstance(typeof(UService), uow);
            UEntity  bllEntity     = EntityService.Get((int)entity.Entity_id);

            BllSelectedEntity <UEntity> bllSelectedEntity = new BllSelectedEntity <UEntity>
            {
                Id     = entity.Id,
                Entity = bllEntity
            };

            return(bllSelectedEntity);
        }
 IDalSelectedEntity IRepository <IDalSelectedEntity, SelectedUser> .Update(IDalSelectedEntity entity)
 {
     throw new NotImplementedException();
 }
 public SelectedUser CreateAndReturnOrm(IDalSelectedEntity entity)
 {
     throw new NotImplementedException();
 }
        public SelectedUser Create(IDalSelectedEntity entity)
        {
            var res = context.Set <SelectedUser>().Add(mapper.MapToOrm((DalSelectedUser)entity));

            return(res);
        }
 IDalSelectedEntity IRepository <IDalSelectedEntity, SelectedStatus> .Create(IDalSelectedEntity entity)
 {
     throw new NotImplementedException();
 }
 public void Update(IDalSelectedEntity entity)
 {
     throw new NotImplementedException();
 }