I have two methods. When I call the method glass, I need to insert the value in a query. How can I insert the value of a method in a query?

I'm working with MVC, C# and SQL Server.

The code I tried: in this method call a method glas

```
RController re = new RController();
re.Glas(C_E);
string insert = "INSERT INTO dbo.MEP (R1) VALUES (@code)";

using (SqlCommand command = new SqlCommand(insert, con))
{
    command.Parameters.AddWithValue("@code", "HERE METHOD GLAS");
    con.Open();
    int result = command.ExecuteNonQuery();
}

```

Method GLAS returns a string. That string is what I need to insert in a query. The query is located in another controller method (Rcontroller).

```
public void GLAS(string C_E)
{
     // more code
     if (i > 0)
     {
          string glas1 =  "OK";
     }
     else
     {
          string glas1 = "Fail"; 
     }
}

```