This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Console.WriteLine("Load plugin cetak nota..\n"); | |
var loader = new PluginLoader(); | |
loader.LoadPlugins(); | |
foreach (var plugin in PluginLoader.Plugins) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
using System.Collections.Generic; | |
using System.Threading.Tasks; | |
using Microsoft.Extensions.Logging; | |
using Dapper.Contrib.Extensions; | |
using NorthwindApi.Model.Context; | |
using NorthwindApi.Model.Entity; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using System.Threading.Tasks; | |
namespace NorthwindApi.Model.Repository | |
{ | |
public interface IBaseRepository<T> | |
where T : class | |
{ | |
Task<int> Save(T obj); | |
Task<int> Update(T obj); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Dapper.Contrib.Extensions; | |
namespace NorthwindApi.Model.Entity | |
{ | |
[Table("products")] | |
public class Product | |
{ | |
[ExplicitKey] | |
public string product_code { get; set; } | |
public string product_name { get; set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Data; | |
using Microsoft.Extensions.Configuration; | |
using Microsoft.Extensions.Logging; | |
using MySql.Data.MySqlClient; | |
namespace NorthwindApi.Model.Context | |
{ | |
public interface IDbContext : IDisposable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Data.OleDb; | |
using PerpustakaanAppMVC.Model.Entity; | |
using PerpustakaanAppMVC.Model.Context; | |
namespace PerpustakaanAppMVC.Model.Repository | |
{ | |
public class MahasiswaRepository |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"server": "192.168.1.1", | |
"database": "DbOpenRetail", | |
"port": 5432 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<configuration> | |
<appSettings> | |
<add key="server" value="192.168.1.1" /> | |
<add key="database" value="DbOpenRetail" /> | |
<add key="port" value="5432" /> | |
</appSettings> | |
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[database] | |
server=192.168.1.1 | |
database=DbOpenRetail | |
port=5432 |
NewerOlder