/// <summary> /// 新增房间数据库操作 /// </summary> /// <param name="hsfDBContext"></param> /// <param name="_SoundHost"></param> public static void AddRoom(HsfDBContext hsfDBContext, host_room room) { room.id = Guid.NewGuid().ToString(); room.CreateTime = DateTime.Now; room.DeleteMark = 0; hsfDBContext.host_room.Add(room); hsfDBContext.SaveChanges(); }
/// <summary> /// 新增房间数据库操作 /// </summary> /// <param name="hsfDBContext"></param> /// <param name="_SoundHost"></param> public static void AddRoom(HsfDBContext hsfDBContext, host_room room, string appUser, string account, string mac) { room.CreateUser = appUser; room.Account = account; room.Mac = mac; room.id = Guid.NewGuid().ToString(); room.CreateTime = DateTime.Now; room.DeleteMark = 0; hsfDBContext.host_room.Add(room); hsfDBContext.SaveChanges(); }