private void LogEvent(string username, string message, LogEventType logEvent) { DateTime now = DateTime.Now; LogModel logModel = new LogModel(); string combinedMessage = message + " for user: " + username; logModel.date = now; logModel.description = combinedMessage; logModel.Username = username; logModel.logEvent = logEvent; db.Logs.Add(logModel); db.SaveChanges(); }
public void createNewUser([Bind(Include = "Id,UserName,Password")] RegistrationModel model) { db.Logins.Add(model); db.SaveChanges(); }