11 Eylül 2016 Pazar

How to call a Controller method which is accepting two models?

I would say that instead of justifying this lack of support of multiple models with documentation, you should find an argument in terms of software architecture perspective: ASP.NET Web API is built on top of MVC paradigm, where a view is bound to a model and handled by a controller.
In other words: 1 Model, 1 View, 1 Controller.
Your use case shouldn't be solved with 2 models, but using a DTO. Instead of binding 2 parameter to 2 models, design a DTO which includes both models as associations of the whole DTO:
// You don't need [FromBody] since complex types are already taken
// from the request body
public IHttpActionResult DoStuff(SomeDto dto)
 
http://stackoverflow.com/questions/25889205/how-to-call-a-controller-method-which-is-accepting-two-models 

31 Ağustos 2016 Çarşamba

MSSQL Backup

RESTORE FILELISTONLY FROM DISK='C:\Db\Backup.bak'

RESTORE DATABASE Db_Name
FROM DISK = N'C:\Db\Backup.bak'
WITH
   MOVE 'backup_dbname' TO 'C:\MSSQL\DATA\Db_Name.mdf',
   MOVE 'backup_dbname_log' TO 'C:\MSSQL\DATA\Db_Name_log.ldf'
Go

30 Ağustos 2016 Salı

MSSQL Ortalama veri ekleme hızı

DECLARE @count int;
SET @count=(select count(0) from Table_Name)

DECLARE @start datetime;
DECLARE @end datetime;
DECLARE @datediff int;
Set @end=(select  top 1 CreatedDate from Table_Name order by CreatedDate desc)
SET @start=(select  top 1 CreatedDate from Table_Name order by CreatedDate )
SET @datediff=( select DATEDIFF(second,@start,@end) AS DIFFDATE)

print ltrim(str(@datediff))+' saniyede toplam '+ltrim(str(@count))+' veri eklendi.';
print 'Ortalama '+ltrim(str(@count/@datediff))+' veri/saniye';

28 Ağustos 2016 Pazar

SQL Shell (PSQL) Dump

click on the SQL Shell and log into the database and use import Server [localhost]: Database [postgres]: Port [5432]: Username [postgres]: Password for user postgres: psql (9.2.4) WARNING: Console code page (437) differs from Windows code page (1252) 8-bit characters might not work correctly. See psql reference page "Notes for Windows users" for details. Type "help" for help. postgres=# \i c:/data/data01.sql

20 Ağustos 2016 Cumartesi

Tarihe göe günlük kayıt sayısı

SELECT Convert(char(8), LogDate, 112), count(distinct RefundId) FROM RefundProcessing GROUP BY Convert(char(8), LogDate, 112)

15 Ağustos 2016 Pazartesi

Çalışma zamanı metot üretip çalıştırma

                Type type = Type.GetType("Namespace.ClassName");
                MethodInfo method = type.GetMethod("MethodName");
                object targetClass = Activator.CreateInstance(type);
                object[] paramters= new object[] { paramter1,..., parameterN };
                method.Invoke(targetClass, paramters);

10 Ağustos 2016 Çarşamba

.net 6 mapget kullanımı

 app.UseEndpoints(endpoints => {     endpoints.MapGet("/", async context =>     {         var response = JsonConvert.Seriali...