public static bool AddNewWithoutCommit(T entity) { try { EntityDb <T> .Save(entity); return(true); } catch (Exception) { throw; } }
public static bool AddNewEntity(T entity) { try { EntityDb <T> .Save(entity); EntityDb <T> .CommitChanges(); EntityDb <T> .CloseSession(); return(true); } catch (Exception) { throw; } }