Friday, September 8, 2017

Some basic command to run cordova app

Here are some basic commands use in cordova CLI

--->for android
cordova build android
cordova build android --release

--->for ios
cordova build ios
cordova build ios--release

cordova run android   ---> for android
cordova run ios---> for ios

Get connected Devices list
adb devices

Get Platform List
cordova platform lst

Get Plugin list
cordova plugin lst

Add Platform
cordova platform add  

Add Plugin
cordova plugin add

Remove Platform
cordova platform remove  

Remove Plugin
cordova plugin remove

Friday, August 21, 2015

I will be back soon

Hi All,
     I will be back with some important post soon ...keep reading

Monday, September 16, 2013

How to use SqlClient.SqlFunctions.DateDiff in LINQ?

Here i am showing how to use SqlClient.SqlFunctions.DateDiff in Entity Framework to delete some records which are older than 8 hours.
/// <summary>
        /// Function Name: DeleteAllOutDatedSession
        /// Bishnu Tewary
        /// 16-09-2013
        /// This function will delete all those records which are older than 8 hours
        /// </summary>
        /// <param name="objEntities">DEMOEntities needs to be submitted to enable SQL-Transactions including Rollbacks</param>
        /// <returns> Result Type</returns>
        public DB DeleteAllOutDatedSession(DEMOEntities objEntities)
            Result = DB.Unknown;
                using (objEntities)
                   (from p in objEntities.tblDEMO.Where(x => System.Data.Objects.SqlClient.SqlFunctions.DateDiff("hour", x.Timestamp, DateTime.Now) >= 8) select p).ToList().ForEach(objEntities.DeleteObject);
            catch (Exception ex)
                this.Report(DB.Error, ex);
            return Result;