What is the difference between using void and T create
Void does not return anything to me and T returns an entity to me, is the use of both is according to the scenario I have, should I use one or the other?
It would bring me complications to work my methods without implementing the using
public void Create(T entity)
{
Context.Set<T>().Add(entity);
}
public void Update(T entity)
{
Context.Set<T>().Attach(entity);
Context.Entry(entity).State = EntityState.Modified;
TrySaveChanges();
}
public void Delete(T entity)
{
throw new NotImplementedException();
}