public new BllEvent Update(BllEvent entity)
        {
            AttributeLibService attributeLibService = new AttributeLibService(uow);
            StatusLibService    statusLibService    = new StatusLibService(uow);
            UserLibService      userLibService      = new UserLibService(uow);
            FilepathLibService  filepathLibService  = new FilepathLibService(uow);

            attributeLibService.Update(entity.AttributeLib);
            statusLibService.Update(entity.StatusLib);
            userLibService.Update(entity.RecieverLib);
            filepathLibService.Update(entity.FilepathLib);
            uow.Events.Update(mapper.MapToDal(entity));
            uow.Commit();

            return(mapper.MapToBll(uow.Events.Get(entity.Id)));
        }
Exemple #2
0
        public new BllUser Update(BllUser entity)
        {
            var testEntity = uow.Users.GetUserByLogin(entity.Login);

            if (testEntity != null)
            {
                StatusLibService    statusLibService    = new StatusLibService(uow);
                EventTypeLibService eventTypeLibService = new EventTypeLibService(uow);
                entity.StatusLib    = statusLibService.Update(entity.StatusLib);
                entity.EventTypeLib = eventTypeLibService.Update(entity.EventTypeLib);
                var ormEntity = uow.Users.Update(mapper.MapToDal(entity));
                uow.Commit();

                return(mapper.MapToBll(uow.Users.Get(entity.Id)));
            }
            return(null);
        }