Пример #1
0
 internal static void SaveApi(Api api)
 {
     connection.Execute("DELETE FROM [API] WHERE [key] = @key", new { key = api.Key });
     connection.Execute("INSERT INTO [API] ([key], [parameters]) VALUES (@key, @parameters);", new { key = api.Key, parameters = api.Parameters });
 }
Пример #2
0
 public ActionResult Add(Api api)
 {
     ApiHelper.SaveApi(api);
     return RedirectToAction("Index");
 }