public void NUnit_Discipline_Domain_Add() { Hre_DisciplineServices service = new Hre_DisciplineServices(); string result = string.Empty; int countSC = 0; for (int i = 1; i <= 10; i++) { var model = new Hre_Discipline { ProfileID = 1, ViolationRule = "ViolationRule " + i, DateOfEffective = DateTime.Now, }; result = service.Add(model); if (result != string.Empty) { countSC += 1; Console.WriteLine("Process Success >>> Create >>> " + model.Id + " | " + model.ViolationRule ); } } Console.WriteLine("Total success record: " + countSC); }
public void AddDiscipline() { for (int i = 0; i < 10000; i++) { var model = new Hre_Discipline { DateOfEffective = DateTime.Now, DateOfInsurance = DateTime.Now, DecisionNo = "Công ty VnResource", DateOfViolation = DateTime.Now, DescriptionOfViolation = "Nghi nhieu", ContentOfDiscipline = "Khong di lam", DateOfExpiry = DateTime.Now, DisciplinedDecidingOrgID = i, DisciplineTypeID = i, Notes = "Ghi chú", ViolationRule = "ViolationRule", Witnesses = "Witnesses", ViolationRuleDescription = "ViolationRuleDescription", ViolationRuleDescriptionEN = "ViolationRuleDescriptionEN", ResultOfRecidivism = "TP. Hồ Chí Minh", TimeOfViolation = "TimeOfViolation", UserApprovedID = 10, UserHeadID = 11, ViolationExplain = "ViolationExplain", UnionAgentID = i, HeadAgentID = i, ManagementAgentID = i, PlaceViolation = "PlaceViolation", DateEndOfViolation = DateTime.Now, Attachment = "Attachment", PercentDeduction = 59, }; var service = new Hre_DisciplineServices(); var repo = service.Add(model); Console.Write("Record: " + repo); } }