public void xxx() { var oTestConcurrenceDto = new TestConcurrenceDto(); oTestConcurrenceDto.Value = Guid.NewGuid(); new TestConcurrenceDal().AddTestConcurrence(oTestConcurrenceDto); }
public void AddTestConcurrence(TestConcurrenceDto oTestConcurrenceDto) { try { using (var ctx = new DatabaseContext()) { var TestConcurrenceId = new Common.Utils().GetPrimaryKey(1, 1000, "TT"); oTestConcurrenceDto.TestConcurrenceId = TestConcurrenceId; oTestConcurrenceDto.Value = oTestConcurrenceDto.Value; ctx.TestConcurrenc.Add(oTestConcurrenceDto); ctx.SaveChanges(); } } catch (Exception ex) { AddTestConcurrence(oTestConcurrenceDto); } }