Esempio n. 1
0
        public static async Task<Boolean> Update(RecordModel model)
        {
            try
            {
                var db = new MongoClient(ConfigurationManager.AppSettings["Mongo"]).GetDatabase("interview").GetCollection<RecordModel>("records_miker");
                await db.ReplaceOneAsync(m => m.Id == model.Id, model);

            }
            catch
            {
                return false;
            }
            return true;
        }