public void Delete(int competitiorId) { var competitior = new Competitor { Id = competitiorId }; _competitors.Attach(competitior); _competitors.Remove(competitior); }
public void Add(Competitor competitor) { _competitors.Add(competitor); }
public void EditApproval(Competitor competitor) { _competitors.Attach(competitor); _dbContext.Entry(competitor).Property(x => x.IsApproved).IsModified = true; _dbContext.Entry(competitor).Property(x => x.Error).IsModified = true; _dbContext.Entry(competitor).Property(x => x.DormId).IsModified = true; _dbContext.Entry(competitor).Property(x => x.DormNumber).IsModified = true; }