Below Code works fine.
public static void UpdateCategory(Category category) {
var dbFactory = new OrmLiteConnectionFactory(connString, SqlServerDialect.Provider);
using (IDbConnection db = dbFactory.OpenDbConnection()) {
try{
db.Update<Category>(category);
}
catch (Exception e) {
throw new Exception(string.Format("Error within {0}", e.Message));
}
}
}
Below code does not?
public static int UpdateRowInTable<T>(object value) {
var dbFactory = new OrmLiteConnectionFactory(connString, SqlServerDialect.Provider);
using (IDbConnection db = dbFactory.OpenDbConnection()) {
try {
result = db.Update<T>(value);
}
catch (Exception e) {
throw new Exception(string.Format("Error within {0}", e.Message));
}
}
}
thanks