示例#1
0
        public void Post(NoteDto noteDto)
        {
            using (var context = new NotesDatabaseContext(ConnectionStringProvider.EntityDatabaseConnectionString))
            {
                var dataItem = noteDto.Map <Data.Models.Note>();

                context.Notes.Add(dataItem);
                context.SaveChanges();
            }
        }