public static long GetNewDeviceTag() { using (HellolingoEntities db = new HellolingoEntities()) { var objParam = new ObjectParameter("newDeviceTag", typeof(long)); db.Configuration_GetNewDeviceTag(objParam); return((long)objParam.Value); } }
public async Task UntagUser(int userId, int tagId) { using (var db = new HellolingoEntities()) { var user = await db.Users.FindAsync(userId); var tagValue = await db.UsersTagsValues.FindAsync(tagId); user.Tags.Remove(tagValue); await db.SaveChangesAsync(); } }