コード例 #1
0
 public static Dictionary ToDomain(this tbWordlist item)
 {
     return(new Dictionary
     {
         Id = item.id,
         Name = item.name,
         Created = item.created
     });
 }
コード例 #2
0
        public void Create(Dictionary dictionary)
        {
            dictionary.Id      = 0;
            dictionary.Created = DateTime.Now;

            var itemToInsert = new tbWordlist();

            dictionary.FillDbObject(itemToInsert);
            DataContext.tbWordlists
            .InsertOnSubmit(itemToInsert);
            DataContext.SubmitChanges();

            dictionary.Id = itemToInsert.id;
        }
コード例 #3
0
 public static void FillDbObject(this Dictionary from, tbWordlist to)
 {
     to.id      = from.Id;
     to.name    = from.Name;
     to.created = from.Created;
 }