/// <summary> /// Attaches the given entity to the context. /// </summary> /// <typeparam name="T"></typeparam> /// <param name="entity">The entity.</param> /// <returns></returns> /// <remarks>It is used to repopulate a context with an entity that is known to already exist in the database.</remarks> public virtual T Attach(T entity) { return(_workspace.Attach(entity)); }