예제 #1
0
        private static void StoreLocalizedMessage(string key, string v)
        {
            string[] keyHash = key.Split(' ');

            using (DataClassesDataContext db = new DataClassesDataContext()) {
                Message m = db.Messages.FirstOrDefault(a => a.LookupKey == keyHash[1] && a.Culture == keyHash[0]);
                if (m == null) {
                    m = new Message {
                        Culture = keyHash[0],
                        LookupKey = keyHash[1],
                        LookupMessage = v,
                        LocalizedMessage = v, // default to standard lookup message
                        CreatedAt = DateTime.UtcNow
                    };

                    db.Messages.InsertOnSubmit(m);
                    db.SubmitChanges();
                }
            }
        }
예제 #2
0
 partial void UpdateMessage(Message instance);
예제 #3
0
 partial void DeleteMessage(Message instance);
예제 #4
0
 partial void InsertMessage(Message instance);