public void CreateUserLog(int userId, User user) { string title = user.Status ? "Unblocked user" : "Blocked user"; Log log = new Log(userId, title, $"User: {user.UserId}, {user.FirstName}", DateTime.Now); _logContext.CreateUserLog(log); }