public static EntityEntry <TEntity> SbDelete <TEntity>(this ChakaContext context, TEntity entity) where TEntity : class { SetValue(entity, "UpdatedBy", 100); SetValue(entity, "DelDate", DateTime.Now); return(context.Set <TEntity>().Update(entity)); }
public static EntityEntry <TEntity> SbEdit <TEntity>(this ChakaContext context, TEntity entity) where TEntity : class { SetValue(entity, "UpdatedBy", 100); SetValue(entity, "BusinessGroupID", 2); SetValue(entity, "UpdatedDate", DateTime.Now); return(context.Set <TEntity>().Update(entity)); }
public static EntityEntry <TEntity> SbAdd <TEntity>(this ChakaContext context, TEntity entity) where TEntity : class { SetValue(entity, "CreatedBy", TokenDataClaim.CurrentUserID); SetValue(entity, "BusinessGroupID", TokenDataClaim.CurrentBusinessGrupID); SetValue(entity, "CreatedDate", DateTime.Now); return(context.Set <TEntity>().Add(entity)); }