public void Add(string title, string desc, string path) { File newFile = new File(); newFile.Title = title; newFile.Description = desc; newFile.Path = path; newFile.CreatedAt = (int)DateTimeOffset.UtcNow.ToUnixTimeSeconds(); _context.Add(newFile); _context.SaveChanges(); }
public void Add(string user, string remote, string message) { Actionlog newLog = new Actionlog(); newLog.User = user; newLog.UserRemote = remote; newLog.Message = message; newLog.Time = (int)DateTimeOffset.UtcNow.ToUnixTimeSeconds(); _context.Add(newLog); _context.SaveChanges(); }