This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Diagnostics; | |
using System.Linq; | |
using Microsoft.Owin; | |
using Owin; | |
[assembly: OwinStartup(typeof(WebApplication5.Startup))] | |
namespace WebApplication5 | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var conn = new SqlConnection("some connection string"); | |
var db = new DatabaseContext(conn); | |
const string tableName = "dbo.tUsers"; | |
var dataFound = db.QueryToTable(tableName) | |
.Where(x => (string)x["UserName"] == "Dzianis") | |
.ToList(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foreach (Row currentRow in rows) | |
{ | |
//write the row start element with the attributes added above | |
_writer.WriteStartElement(currentRow); | |
foreach (OpenXmlElement currentCell in currentRow.ChildElements) | |
{ | |
var cell = (Cell)currentCell; | |
//write the start of the cell element with the type and cell reference attributes |
NewerOlder