public async Task <CakeModel> Add(CakeModel cake) { if (cake == null) { throw new NullReferenceException(nameof(cake)); } cake.Id = new Guid(); await db.AddAsync(cake); return(cake); }
public async Task <CakeModel> Add(CakeModel cake) { if (cake == null) { throw new NullReferenceException(nameof(cake)); } cake.Id = new Guid(); await db.AddAsync(cake); return(cake); }