public PushData ( |
||
command | ||
return | void |
public void Update(Analysis analysis) { const string query = "UPDATE Analysis SET Analysis= @Analysis WHERE AnalysisId = @AnalysisId"; var command = new SqlCommand(query); command.Parameters.Add("@@Analysis", SqlDbType.NText); command.Parameters["@@Analysis"].Value = new JsonFormatter().ToJson(analysis); command.Parameters.AddWithValue("@AnalysisId", analysis.Id); _databaseProvider.PushData(command); }
public void Remove(Template template) { new AnalysisProvider(_databaseProvider).Remove(template); const string query = "DELETE FROM Template WHERE Name=@Name"; var command = new SqlCommand(query); command.Parameters.Add("@Name", SqlDbType.NVarChar); command.Parameters["@Name"].Value = template.Name; _databaseProvider.PushData(command); }
public void Update(Person person) { const string query = "UPDATE Persons SET FirstName = @FirstName, LastName=@LastName, MiddleName=@MiddleName, " + "BirthDate=@BirthDate WHERE PersonId=@PersonId"; var command = new SqlCommand(query); AddMainParameters(command, person); command.Parameters["@PersonId"].Value = person.Id; _databaseProvider.PushData(command); }