Exemplo n.º 1
0
 public static void Add(params User[] users)
 {
     using (var connector = new BDConnector())
     {
         foreach (var user in users)
         {
             connector.Add("UserIfo", Tuple.Create("ID", user.Email),
                           Tuple.Create("UserInfo", JsonConvert.SerializeObject(user)));
         }
     }
 }
Exemplo n.º 2
0
 public static void Add(params Meeting[] meetings)
 {
     using (var connector = new BDConnector())
     {
         foreach (var meeting in meetings)
         {
             connector.Add("Meetings",
                           Tuple.Create("ID", meeting.Id.ToString()),
                           Tuple.Create("FirstUserId", meeting.FirstUserId),
                           Tuple.Create("SecondUserId", meeting.SecondUserId),
                           Tuple.Create("Date", meeting.Date.ToString("yyyy-MM-dd HH:mm:ss")),
                           Tuple.Create("FirstUserSetRate", meeting.FirstUserSetRate ? "1" : "0"),
                           Tuple.Create("SecondUserSetRate", meeting.SecondUserSetRate ? "1" : "0"));
         }
     }
 }