In entity framework you have to write a lot of code for saving or updating a single entity:
using (DataContext context = new DataContext())
{
context.Task.Attach(task);
if (task.ID == 0)
{
context.ObjectStateManager.ChangeObjectState(task, System.Data.EntityState.Added);
}
else
{
context.ApplyOriginalValues(task.GetType().Name, task);
}
context.SaveChanges();
}
in hibernate it is just saveOrUpdate()
This is not about being lazy, it is about making it short and clean.