Okay, I have been chasing my tail and reading about MVVM and WPF. I understand the concept, but my brain just can't handle reading any more, so I am begging for help. I have the following database that will be either running on SQL CE or SQLLite (SQL Code at the end).
I need to have a view for each table, and I really need to know how I do transactions. It is possible that a user will add a record into the database, and I will need to add records to multiple tables. Normally I would use a transaction in a Stored Procedure. I am familiar with LINQ if someone suggests going that route. The database is going to site on the local machine since it will not be connected to the network when in use. I have the synchronization worked out, that was easy.
So what am I asking for? Well I need help with the following:
Setting up multiple models for each table in the database
Help with multiple (transaction type) updates, inserts, deletes
Passing through events (button click, dropdown select)
I would really like to know if there is a good tool that could read the structure of the database and create the Model for each table. If there is one, can someone please, provide a link?
What I don't want:
I am not expecting anyone to provide me with a completed project. I am looking to learn how to do this so I would like to do the work, I just need guidance and if possible tools to help me out.
Thanks all.
USE [master]
GO
/****** Object: Database [AutoCF84] Script Date: 6/25/2015 2:14:52 PM ******/
CREATE DATABASE [AutoCF84]
CONTAINMENT = NONE
ON PRIMARY
( NAME = N'AutoCF84', FILENAME = N'D:\Databases\AutoCF84.mdf' , SIZE = 3072KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
LOG ON
( NAME = N'AutoCF84_log', FILENAME = N'E:\DBLogs\AutoCF84_log.ldf' , SIZE = 5184KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)
GO
ALTER DATABASE [AutoCF84] SET COMPATIBILITY_LEVEL = 100
GO
IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
begin
EXEC [AutoCF84].[dbo].[sp_fulltext_database] @action = 'enable'
end
GO
ALTER DATABASE [AutoCF84] SET ANSI_NULL_DEFAULT OFF
GO
ALTER DATABASE [AutoCF84] SET ANSI_NULLS OFF
GO
ALTER DATABASE [AutoCF84] SET ANSI_PADDING OFF
GO
ALTER DATABASE [AutoCF84] SET ANSI_WARNINGS OFF
GO
ALTER DATABASE [AutoCF84] SET ARITHABORT OFF
GO
ALTER DATABASE [AutoCF84] SET AUTO_CLOSE OFF
GO
ALTER DATABASE [AutoCF84] SET AUTO_SHRINK OFF
GO
ALTER DATABASE [AutoCF84] SET AUTO_UPDATE_STATISTICS ON
GO
ALTER DATABASE [AutoCF84] SET CURSOR_CLOSE_ON_COMMIT OFF
GO
ALTER DATABASE [AutoCF84] SET CURSOR_DEFAULT GLOBAL
GO
ALTER DATABASE [AutoCF84] SET CONCAT_NULL_YIELDS_NULL OFF
GO
ALTER DATABASE [AutoCF84] SET NUMERIC_ROUNDABORT OFF
GO
ALTER DATABASE [AutoCF84] SET QUOTED_IDENTIFIER OFF
GO
ALTER DATABASE [AutoCF84] SET RECURSIVE_TRIGGERS OFF
GO
ALTER DATABASE [AutoCF84] SET DISABLE_BROKER
GO
ALTER DATABASE [AutoCF84] SET AUTO_UPDATE_STATISTICS_ASYNC OFF
GO
ALTER DATABASE [AutoCF84] SET DATE_CORRELATION_OPTIMIZATION OFF
GO
ALTER DATABASE [AutoCF84] SET TRUSTWORTHY OFF
GO
ALTER DATABASE [AutoCF84] SET ALLOW_SNAPSHOT_ISOLATION OFF
GO
ALTER DATABASE [AutoCF84] SET PARAMETERIZATION SIMPLE
GO
ALTER DATABASE [AutoCF84] SET READ_COMMITTED_SNAPSHOT OFF
GO
ALTER DATABASE [AutoCF84] SET HONOR_BROKER_PRIORITY OFF
GO
ALTER DATABASE [AutoCF84] SET RECOVERY FULL
GO
ALTER DATABASE [AutoCF84] SET MULTI_USER
GO
ALTER DATABASE [AutoCF84] SET PAGE_VERIFY CHECKSUM
GO
ALTER DATABASE [AutoCF84] SET DB_CHAINING OFF
GO
ALTER DATABASE [AutoCF84] SET FILESTREAM( NON_TRANSACTED_ACCESS = OFF )
GO
ALTER DATABASE [AutoCF84] SET TARGET_RECOVERY_TIME = 0 SECONDS
GO
ALTER DATABASE [AutoCF84] SET DELAYED_DURABILITY = DISABLED
GO
ALTER DATABASE [AutoCF84] SET READ_WRITE
GO