Yes u can
Try it
using(SqlConnection sqlCon = new SqlConnection(ConnectionString))
{
StringBuilder sb = new StringBuilder();
sb.AppendFormat(@"RESTORE DATABASE [{0}] FROM DISK = N'{1}' WITH FILE = {2}, MOVE N'{3}' TO N'{4}', MOVE N'{5}' TO N'{6}', NOUNLOAD, REPLACE, STATS = 1",
DBNameTo, BackupFilePath, Position, DBNameFrom, MdfFileName, LogFileName, LdfFileName);
SqlCommand sqlCmd = new SqlCommand(sb.ToString(), sqlCon);
sqlCmd.CommandTimeout = 10000;
sqlCmd.ExecuteNonQuery();
sqlCon.Close();
}