public void Insert(string Title, string Contents, string Ip, EnumTypes types = EnumTypes.其他分类, string TypeName = "", string Others = "", string oldXML = "", string newXML = "") { Logs logs = new Logs(); logs.Id = Guid.NewGuid(); logs.CreatedDate = DateTime.Now; logs.CreatedId = Guid.NewGuid(); logs.CreatedName = "admin"; logs.UpdateId = Guid.NewGuid(); logs.UpdateDate = DateTime.Now; logs.UpdateName = "admin"; logs.Title = Title; logs.TypeName = TypeName; logs.IPAddress = Ip; logs.Contents = Contents; logs.Others = Others; logs.OldXml = string.IsNullOrEmpty(oldXML) ? null : oldXML; logs.NewXml = string.IsNullOrEmpty(newXML) ? null : newXML; _logRepositoty.Insert(logs); }
public void Insert(Logs logs) { _logRepositoty.Insert(logs); }