public void log(string Operator, string Method, string boo, string reason) { var dbService = new MongoDbService(); var id = Guid.NewGuid().ToString(); dbService.Add(new LogEntity { _id = id, Operator = Operator, Method = Method, boo = boo, reason = reason, Time = DateTime.Now }); }
public void AddTest() { for (int i = 0; i < 10; i++) { DBLogEntity entity = new DBLogEntity(); entity.tabName = "tbUser"; entity.tId = "1"; entity.lType = 2; entity.sql = ""; entity.paras = ""; entity.ms = 10; entity.uId = "user" + (i + 1); entity.ctime = DateTime.Now; dbService.Add <DBLogEntity>("YMOA", "DBLog", entity); } }
public void AddCustomer(CustomerEntity customer) { mongoDbService.Add(customer); }