Ejemplo n.º 1
0
 internal ActivityEntity AddActivity(ActivityEntity newActivity)
 {
     newActivity.Id = 1000;
     _dbContext.Activities.Add(_mapper.Map <Activity>(newActivity));
     _dbContext.SaveChanges();
     return(newActivity);
 }
Ejemplo n.º 2
0
        internal void EndAlgoExecution(int algoExeId, int projectExeID)
        {
            var execution = _dbContext.ExecutionInfos.First(x => x.Id == algoExeId);

            execution.EndDate            = DateTime.Now;
            execution.ProjectExecutionId = projectExeID;
            _dbContext.SaveChanges();
        }
Ejemplo n.º 3
0
        public MessageEntity AddNewMessage(string messageTitle, string messageText, string userName)
        {
            MessageEntity message = new MessageEntity {
                CreateDate = DateTime.Now, Title = messageTitle, Context = messageText, UserName = userName
            };

            _dbContext.Messages.Add(_mapper.Map <Message>(message));
            _dbContext.SaveChanges();
            return(message);
        }