Skip to content

Commit

Permalink
Primeiros estudos com o simple.data
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcio Althmann committed Sep 7, 2011
1 parent 35df5f2 commit fff72a5
Show file tree
Hide file tree
Showing 298 changed files with 319 additions and 0 deletions.
72 changes: 72 additions & 0 deletions EstudosSimpleData/EstudosSimpleData.6.0.ReSharper.user
@@ -0,0 +1,72 @@
<Configuration>
<RecentFiles>
<RecentFiles>
<File id="E523AF89-B5A2-4F6B-83F0-BA75314CABD0/f:Program.cs" caret="230" fromTop="4" />
</RecentFiles>
<RecentEdits>
<File id="E523AF89-B5A2-4F6B-83F0-BA75314CABD0/f:Program.cs" caret="2203" fromTop="17" />
<File id="E523AF89-B5A2-4F6B-83F0-BA75314CABD0/f:Program.cs" caret="317" fromTop="14" />
<File id="E523AF89-B5A2-4F6B-83F0-BA75314CABD0/f:Program.cs" caret="1832" fromTop="27" />
<File id="E523AF89-B5A2-4F6B-83F0-BA75314CABD0/f:Program.cs" caret="2066" fromTop="32" />
<File id="E523AF89-B5A2-4F6B-83F0-BA75314CABD0/f:Program.cs" caret="203" fromTop="10" />
<File id="E523AF89-B5A2-4F6B-83F0-BA75314CABD0/f:Program.cs" caret="1449" fromTop="23" />
<File id="E523AF89-B5A2-4F6B-83F0-BA75314CABD0/f:Program.cs" caret="1751" fromTop="32" />
<File id="E523AF89-B5A2-4F6B-83F0-BA75314CABD0/f:Program.cs" caret="1759" fromTop="22" />
<File id="E523AF89-B5A2-4F6B-83F0-BA75314CABD0/f:Program.cs" caret="1304" fromTop="38" />
<File id="E523AF89-B5A2-4F6B-83F0-BA75314CABD0/f:Program.cs" caret="447" fromTop="18" />
<File id="E523AF89-B5A2-4F6B-83F0-BA75314CABD0/f:Program.cs" caret="1015" fromTop="13" />
</RecentEdits>
</RecentFiles>
<CompletionStatisticsManager>
<ItemStatistics item="CSharpCodeCompletionContext">
<Item value="public" priority="30" />
<Item value="class" priority="30" />
<Item value="prop" priority="63" />
<Item value="int" priority="30" />
<Item value="string" priority="30" />
<Item value="var" priority="127" />
<Item value="Console`0" priority="127" />
<Item value="new" priority="63" />
<Item value="EstiloMusical" priority="57" />
<Item value="Nome" priority="64" />
<Item value="db" priority="63" />
<Item value="estiloMusical" priority="191" />
<Item value="foreach" priority="95" />
<Item value="static" priority="191" />
<Item value="void" priority="159" />
<Item value="dynamic" priority="31" />
<Item value="_db" priority="95" />
<Item value="IncluirEstiloMusicalSemPoco`0" priority="31" />
<Item value="IdEstiloMusical" priority="31" />
<Item value="AlterarEstiloMusicalComPoco`0" priority="31" />
<Item value="AlterarEstiloMusicalSemPoco`0" priority="31" />
<Item value="LerTodosEstilosMusicais`0" priority="31" />
</ItemStatistics>
<ItemStatistics item="Qualified:@Simple.Data.Database">
<Item value="OpenFile`0" priority="26" />
</ItemStatistics>
<ItemStatistics item="Qualified:@System.Console">
<Item value="Read`0" priority="26" />
<Item value="WriteLine`0" priority="80" />
</ItemStatistics>
</CompletionStatisticsManager>
<NAntValidationSettings>
<NAntPath value="" />
</NAntValidationSettings>
<UnitTestRunner>
<Providers />
</UnitTestRunner>
<UnitTestRunnerNUnit>
<NUnitInstallDir IsNull="False">
</NUnitInstallDir>
<UseAddins>Never</UseAddins>
</UnitTestRunnerNUnit>
<SettingsComponent>
<string />
<integer />
<boolean>
<setting name="livetemplates.csharp.usevar">True</setting>
<setting name="SolutionAnalysisEnabled">False</setting>
</boolean>
</SettingsComponent>
</Configuration>
20 changes: 20 additions & 0 deletions EstudosSimpleData/EstudosSimpleData.sln
@@ -0,0 +1,20 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EstudosSimpleData", "EstudosSimpleData\EstudosSimpleData.csproj", "{E523AF89-B5A2-4F6B-83F0-BA75314CABD0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E523AF89-B5A2-4F6B-83F0-BA75314CABD0}.Debug|x86.ActiveCfg = Debug|x86
{E523AF89-B5A2-4F6B-83F0-BA75314CABD0}.Debug|x86.Build.0 = Debug|x86
{E523AF89-B5A2-4F6B-83F0-BA75314CABD0}.Release|x86.ActiveCfg = Release|x86
{E523AF89-B5A2-4F6B-83F0-BA75314CABD0}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
Binary file added EstudosSimpleData/EstudosSimpleData.suo
Binary file not shown.
74 changes: 74 additions & 0 deletions EstudosSimpleData/EstudosSimpleData/EstudosSimpleData.csproj
@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{E523AF89-B5A2-4F6B-83F0-BA75314CABD0}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>EstudosSimpleData</RootNamespace>
<AssemblyName>EstudosSimpleData</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Simple.Data">
<HintPath>..\packages\Simple.Data.Core.0.9.3.2\lib\net40\Simple.Data.dll</HintPath>
</Reference>
<Reference Include="Simple.Data.Ado">
<HintPath>..\packages\Simple.Data.Ado.0.9.3.2\lib\net40\Simple.Data.Ado.dll</HintPath>
</Reference>
<Reference Include="Simple.Data.SqlCe40">
<HintPath>..\packages\Simple.Data.SqlCompact40.0.9.3.2\lib\net40\Simple.Data.SqlCe40.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="SimpleData.sdf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
78 changes: 78 additions & 0 deletions EstudosSimpleData/EstudosSimpleData/Program.cs
@@ -0,0 +1,78 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Simple.Data;

namespace EstudosSimpleData
{
class Program
{
private static dynamic _db;

static void Main(string[] args)
{
_db = Database.OpenFile("SimpleData.sdf");

AlterarEstiloMusicalComPoco();
AlterarEstiloMusicalSemPoco();

LerTodosEstilosMusicais();

Console.Read();
}

static void AlterarEstiloMusicalSemPoco()
{
_db.EstiloMusical.UpdateByIdEstiloMusical(IdEstiloMusical: 1, Nome: "Black Metal");
}

static void AlterarEstiloMusicalComPoco()
{
var estiloMusical = new EstiloMusical
{
IdEstiloMusical = 2,
Nome = "Blues"
};
_db.EstiloMusical.UpdateByIdEstiloMusical(estiloMusical);
}

static void LerTodosEstilosMusicais()
{
foreach (var estiloMusical in _db.EstiloMusical.All())
{
Console.WriteLine("Id: {0} Nome: {1}", estiloMusical.IdEstiloMusical, estiloMusical.Nome);
}
}

static void IncluirEstiloMusicalSemPoco()
{
_db.EstiloMusical.Insert(Nome: "Jazz");
}

private static void ObterTodosEstilosMusicais()
{
var estilosMusicais = _db.EstiloMusical.All();
foreach (var estiloMusical in estilosMusicais)
{
Console.WriteLine(estiloMusical.Nome);
}
}

static void IncluirEstiloMusicalUtilizandoPoco()
{
var estiloMusical = new EstiloMusical
{
Nome = "Death Metal"
};

_db.EstiloMusical.Insert(estiloMusical);
}
}

public class EstiloMusical
{
public int IdEstiloMusical { get; set; }
public string Nome { get; set; }
}
}
36 changes: 36 additions & 0 deletions EstudosSimpleData/EstudosSimpleData/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("EstudosSimpleData")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("EstudosSimpleData")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("65d0efb7-5ca3-4c91-bc2e-78c1aa930ec0")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,9 @@
E:\Artigos\EstudosSimpleData\EstudosSimpleData\bin\Debug\SimpleData.sdf
E:\Artigos\EstudosSimpleData\EstudosSimpleData\bin\Debug\EstudosSimpleData.exe
E:\Artigos\EstudosSimpleData\EstudosSimpleData\bin\Debug\EstudosSimpleData.pdb
E:\Artigos\EstudosSimpleData\EstudosSimpleData\bin\Debug\Simple.Data.Ado.dll
E:\Artigos\EstudosSimpleData\EstudosSimpleData\bin\Debug\Simple.Data.dll
E:\Artigos\EstudosSimpleData\EstudosSimpleData\bin\Debug\Simple.Data.SqlCe40.dll
E:\Artigos\EstudosSimpleData\EstudosSimpleData\obj\x86\Debug\ResolveAssemblyReference.cache
E:\Artigos\EstudosSimpleData\EstudosSimpleData\obj\x86\Debug\EstudosSimpleData.exe
E:\Artigos\EstudosSimpleData\EstudosSimpleData\obj\x86\Debug\EstudosSimpleData.pdb
Binary file not shown.
Binary file not shown.
Binary file not shown.
6 changes: 6 additions & 0 deletions EstudosSimpleData/EstudosSimpleData/packages.config
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Simple.Data.Core" version="0.9.3.2" />
<package id="Simple.Data.Ado" version="0.9.3.2" />
<package id="Simple.Data.SqlCompact40" version="0.9.3.2" />
</packages>
Binary file not shown.
@@ -0,0 +1 @@
*�[
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
�}�
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
3 changes: 3 additions & 0 deletions EstudosSimpleData/_ReSharper.EstudosSimpleData/ModuleIds.xml
@@ -0,0 +1,3 @@
<Modules>
<Module PersistentId="E523AF89-B5A2-4F6B-83F0-BA75314CABD0" ModuleId="EstudosSimpleData" />
</Modules>
@@ -0,0 +1 @@
3��A
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
�X,
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 2 additions & 0 deletions EstudosSimpleData/_ReSharper.EstudosSimpleData/WordIndex/.crc
@@ -0,0 +1,2 @@
v
_d
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 4 additions & 0 deletions EstudosSimpleData/packages/repositories.config
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<repositories>
<repository path="..\EstudosSimpleData\packages.config" />
</repositories>

0 comments on commit fff72a5

Please sign in to comment.