Entity Framework Sum Method -


        var resultlist = new datatable();         sqlconnection connection = new sqlconnection(@"server=. ; database=personneltrackingsystem;trusted_connection=yes");         connection.open();         sqldataadapter da = new sqldataadapter(@"select sum(takepay) [personneltrackingsystem].[dbo].[personnelsallaries] ", connection);         da.fill(resultlist);         return resultlist; 

this sql code sum of integer take pay variables. how can change them entity framework ? tried doesn't work

 personneltrackingsystementities entity = new personneltrackingsystementities();         return (entity.personnelsallaries.sum(d => d.takepay)).tostring().tolist(); 


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -