is there a way to write this same SQL atomic instruction using Entities and LinQ?
IF EXISTS (SELECT * FROM MyTable WHERE ID = @Id) UPDATE MyTable SET name = @name ELSE INSERT INTO MyTable (@Id, @name)
or do you need to call a stored procedure from within the EF?