Search Results

Search found 8990 results on 360 pages for 'customer contact'.

Page 42/360 | < Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >

  • LINQ - if condition

    - by ile
    In code, the commented part is what I need to solve... Is there a way to write such query in LINQ? I need this because I will need sorting based on Status. var result = ( from contact in db.Contacts join user in db.Users on contact.CreatedByUserID equals user.UserID join deal in db.Deals on contact.ContactID equals deal.ContactID into deals orderby contact.ContactID descending select new ContactListView { ContactID = contact.ContactID, FirstName = contact.FirstName, LastName = contact.LastName, Email = contact.Email, Deals = deals.Count(), EstValue = deals.Sum(e => e.EstValue), SalesAgent = user.FirstName + " " + user.LastName, Tasks = 7, // This is critical part if(Deals == 0) Status = "Prospect"; else Status = "Client"; // End of critical part... }) .OrderBy(filterQuery.OrderBy + " " + filterQuery.OrderType) .Where(filterQuery.Status);

    Read the article

  • Parallelism in .NET – Part 2, Simple Imperative Data Parallelism

    - by Reed
    In my discussion of Decomposition of the problem space, I mentioned that Data Decomposition is often the simplest abstraction to use when trying to parallelize a routine.  If a problem can be decomposed based off the data, we will often want to use what MSDN refers to as Data Parallelism as our strategy for implementing our routine.  The Task Parallel Library in .NET 4 makes implementing Data Parallelism, for most cases, very simple. Data Parallelism is the main technique we use to parallelize a routine which can be decomposed based off data.  Data Parallelism refers to taking a single collection of data, and having a single operation be performed concurrently on elements in the collection.  One side note here: Data Parallelism is also sometimes referred to as the Loop Parallelism Pattern or Loop-level Parallelism.  In general, for this series, I will try to use the terminology used in the MSDN Documentation for the Task Parallel Library.  This should make it easier to investigate these topics in more detail. Once we’ve determined we have a problem that, potentially, can be decomposed based on data, implementation using Data Parallelism in the TPL is quite simple.  Let’s take our example from the Data Decomposition discussion – a simple contrast stretching filter.  Here, we have a collection of data (pixels), and we need to run a simple operation on each element of the pixel.  Once we know the minimum and maximum values, we most likely would have some simple code like the following: for (int row=0; row < pixelData.GetUpperBound(0); ++row) { for (int col=0; col < pixelData.GetUpperBound(1); ++col) { pixelData[row, col] = AdjustContrast(pixelData[row, col], minPixel, maxPixel); } } .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } This simple routine loops through a two dimensional array of pixelData, and calls the AdjustContrast routine on each pixel. As I mentioned, when you’re decomposing a problem space, most iteration statements are potentially candidates for data decomposition.  Here, we’re using two for loops – one looping through rows in the image, and a second nested loop iterating through the columns.  We then perform one, independent operation on each element based on those loop positions. This is a prime candidate – we have no shared data, no dependencies on anything but the pixel which we want to change.  Since we’re using a for loop, we can easily parallelize this using the Parallel.For method in the TPL: Parallel.For(0, pixelData.GetUpperBound(0), row => { for (int col=0; col < pixelData.GetUpperBound(1); ++col) { pixelData[row, col] = AdjustContrast(pixelData[row, col], minPixel, maxPixel); } }); Here, by simply changing our first for loop to a call to Parallel.For, we can parallelize this portion of our routine.  Parallel.For works, as do many methods in the TPL, by creating a delegate and using it as an argument to a method.  In this case, our for loop iteration block becomes a delegate creating via a lambda expression.  This lets you write code that, superficially, looks similar to the familiar for loop, but functions quite differently at runtime. We could easily do this to our second for loop as well, but that may not be a good idea.  There is a balance to be struck when writing parallel code.  We want to have enough work items to keep all of our processors busy, but the more we partition our data, the more overhead we introduce.  In this case, we have an image of data – most likely hundreds of pixels in both dimensions.  By just parallelizing our first loop, each row of pixels can be run as a single task.  With hundreds of rows of data, we are providing fine enough granularity to keep all of our processors busy. If we parallelize both loops, we’re potentially creating millions of independent tasks.  This introduces extra overhead with no extra gain, and will actually reduce our overall performance.  This leads to my first guideline when writing parallel code: Partition your problem into enough tasks to keep each processor busy throughout the operation, but not more than necessary to keep each processor busy. Also note that I parallelized the outer loop.  I could have just as easily partitioned the inner loop.  However, partitioning the inner loop would have led to many more discrete work items, each with a smaller amount of work (operate on one pixel instead of one row of pixels).  My second guideline when writing parallel code reflects this: Partition your problem in a way to place the most work possible into each task. This typically means, in practice, that you will want to parallelize the routine at the “highest” point possible in the routine, typically the outermost loop.  If you’re looking at parallelizing methods which call other methods, you’ll want to try to partition your work high up in the stack – as you get into lower level methods, the performance impact of parallelizing your routines may not overcome the overhead introduced. Parallel.For works great for situations where we know the number of elements we’re going to process in advance.  If we’re iterating through an IList<T> or an array, this is a typical approach.  However, there are other iteration statements common in C#.  In many situations, we’ll use foreach instead of a for loop.  This can be more understandable and easier to read, but also has the advantage of working with collections which only implement IEnumerable<T>, where we do not know the number of elements involved in advance. As an example, lets take the following situation.  Say we have a collection of Customers, and we want to iterate through each customer, check some information about the customer, and if a certain case is met, send an email to the customer and update our instance to reflect this change.  Normally, this might look something like: foreach(var customer in customers) { // Run some process that takes some time... DateTime lastContact = theStore.GetLastContact(customer); TimeSpan timeSinceContact = DateTime.Now - lastContact; // If it's been more than two weeks, send an email, and update... if (timeSinceContact.Days > 14) { theStore.EmailCustomer(customer); customer.LastEmailContact = DateTime.Now; } } Here, we’re doing a fair amount of work for each customer in our collection, but we don’t know how many customers exist.  If we assume that theStore.GetLastContact(customer) and theStore.EmailCustomer(customer) are both side-effect free, thread safe operations, we could parallelize this using Parallel.ForEach: Parallel.ForEach(customers, customer => { // Run some process that takes some time... DateTime lastContact = theStore.GetLastContact(customer); TimeSpan timeSinceContact = DateTime.Now - lastContact; // If it's been more than two weeks, send an email, and update... if (timeSinceContact.Days > 14) { theStore.EmailCustomer(customer); customer.LastEmailContact = DateTime.Now; } }); Just like Parallel.For, we rework our loop into a method call accepting a delegate created via a lambda expression.  This keeps our new code very similar to our original iteration statement, however, this will now execute in parallel.  The same guidelines apply with Parallel.ForEach as with Parallel.For. The other iteration statements, do and while, do not have direct equivalents in the Task Parallel Library.  These, however, are very easy to implement using Parallel.ForEach and the yield keyword. Most applications can benefit from implementing some form of Data Parallelism.  Iterating through collections and performing “work” is a very common pattern in nearly every application.  When the problem can be decomposed by data, we often can parallelize the workload by merely changing foreach statements to Parallel.ForEach method calls, and for loops to Parallel.For method calls.  Any time your program operates on a collection, and does a set of work on each item in the collection where that work is not dependent on other information, you very likely have an opportunity to parallelize your routine.

    Read the article

  • Oracle Buys Compendium - Adds Leading Content Marketing Platform to Oracle Eloqua Marketing Cloud

    - by Richard Lefebvre
    News Facts Oracle today announced that it has acquired Compendium, a cloud-based content marketing provider that helps companies plan, produce and deliver engaging content across multiple channels throughout their customers’ lifecycle. Compendium’s data-driven approach aligns relevant content with customer data and profiles to help companies more effectively attract prospects, engage buyers, accelerate conversion of prospects to opportunities, increase adoption, and drive revenue growth. Compendium’s innovative solution complements Oracle’s industry leading Eloqua Marketing Cloud which is a part of Oracle’s comprehensive Customer Experience solution. The combination of Oracle Eloqua Marketing Cloud with Compendium is expected to enable modern marketers to align persona-based content to customers’ digital body language to increase “top-of-funnel” customer engagement, improve the quality of sales leads, realize the highest return on their marketing investment, and increase customer loyalty. More information on this announcement can be found at http://www.oracle.com/compendium. Supporting Quotes “As customers increasingly access information through online and mobile channels, the buying process is shifting from sales-driven to marketing-driven. Now, more than ever, marketers are challenged to deliver relevant and engaging content across multiple channels and throughout the customer lifecycle,” said Thomas Kurian, Executive Vice President, Oracle Development. “By adding Compendium’s content marketing platform to Oracle Eloqua Marketing Cloud, customers will be able to capture more prospects, improve the customer experience and drive top line revenue.” “Oracle Eloqua Marketing Cloud is uniquely positioned to capture a prospect’s digital body language to help companies know each buyer’s demographics, behaviors and influencers,” said Chris Baggott, Compendium CEO. “By combining this buyer profile with Compendium’s data-driven content marketing platform, marketers will be able to deliver the right content, to the right individual across the right channel at the right time. We are very excited to now be a part of the industry’s most complete marketing cloud solution, giving us a global stage to deliver innovative content marketing solutions.” Supporting Resources About Oracle and Compendium General Presentation Customer and Partner Letter FAQ

    Read the article

  • CX en la nube

    - by Noelia Gomez
    Las organizaciones con más éxito del mundo optan por ofrecer un servicio al cliente en la nube. Echa un vistazo a esta infografía para saber por qué 1024x768 Normal 0 21 false false false ES X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-family:"Calibri","sans-serif"; mso-ascii- mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi- mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} Si quieres saber más sobre la experiencia del cliente: · Customer Concepts Magazine · Customer Concepts Exchange in LinkedIn · Customer Concepts Web TV · Customer Experience @ Oracle.com · Customer Experience Facebook Hub · Customer Experience YouTube Channel · Customer Experience Twitter

    Read the article

  • How to detect if a Surface Contact is over a ScatterView?

    - by Bart Roozendaal
    This is a (kind of) similar situation as in the SDK Sample Shopping Cart for MS Surface. I have an application with two ScatterViews. The first covers the complete Surface window ('surface'). The second resides in a TagVisualization object ('pod'). There might be more than one pod available (if more than one tag is down on the table). I would like to be able to drag a ScatterViewItem from the 'pod' to the 'surface' or another 'pod'. I have no problems in detecting if a ScatterViewItem is leaving its ScatterView parent. Also, no problems in reparenting the ScatterViewItem. However, I want to detect which ScatterView the item is being dragged on. In the SDK Sample they have used a visual element (an ellipse in this case) which is below the ScatterViews. VisualTreeHelper.HitTest is used to determine if the contact is over the ellipse. If so, the 'connected' ScatterView is found. I don't think this is a very elegant solution. I wouldn't want a visual element put in there, just to detect if a contact is over a ScatterView. Are there betterwways to accomplish this kind of 'hittesting'? Thanks, Bart

    Read the article

  • Drive Online Engagement with Intuitive Portals and Websites

    - by kellsey.ruppel
    As more and more business is being conducted via online channels, engaging users and making them more productive and efficient though these online channels is becoming critical. These users could be customers, partners or employees and while the respective channels through which they interact might be different, these users do increasingly interact with your business through the Web, or mobile devices or now through various social mediums.  Businesses need a user engagement strategy and solution that allows them to deliver targeted and personalized content and applications to users through the various online mediums and touch points.  The customer experience today is made up of an ongoing set of interactions with organizations across many channels, online and offline.  The Direct channel (including sales reps, email and mail) is an important point of contact, as is the Contact Center.  Contact Centers rely on the phone as a means of interacting with customers, and also more now than ever, the Web as well.  However, the online organization is often managed separately from the Contact Center organization within a business. In-store is an important channel for retailers, offering Point-of-Service for human interactions, and Kiosks which enable self-service. Kiosks are a Web-enabled touch point but in-store kiosks are often managed by the head of retail operations, rather than the online organization.  And of course, the online channel, including customer interactions with an organization via digital means -- on the website, mobile websites, and social networking sites, has risen to paramount importance in recent years in the customer experience. Historically all of these channels have been managed separately. The result of all of this fragmentation is that the customer touch points with an organization are siloed.  Their interactions online are not known and respected in their dealings in-store.  Their calls to the contact center are not taken as input into what the website offers them when they arrive. Think of how many times you’ve fallen victim to this. Your experience with the company call center is different than the experience in-store. Your experience with the company website on your desktop computer is different than your experience on your iPad. I think you get the point. But the customer isn’t the only one we need to look at here, as employees and the IT organization have challenges as well when it comes to online engagement. There are many common tools and technologies that organizations have been using to try and engage users, whether it’s customers, employees or partners. Some have adopted different blog and wiki technologies (some hosted, some open source, sometimes embedded in platforms), to things like tagging, file sharing and content management, or composite applications for self-service applications and activity streams. Basically, there are so many different tools & technologies that each address different aspects of user engagement. Now, one of the challenges with this, is that if we look at each individual tool, typically just implementing for example a file sharing and basic collaboration solution, may meet the needs of the business user for one aspect of user engagement, but it may not be the best solution to engage with customers and partners, or it may not fit with IT standards such as integrating with their single sign on tools or their corporate website. Often, the scenario is that businesses are having to acquire multiple pieces and parts as well as build custom applications to meet their needs. Leaving customers and partners with a more fragmented way of interacting with the company. Every organization has some sort of enterprise balancing act between the needs of the business user and the needs and restrictions enforced by enterprise IT groups. As we’ve been discussing, we all know that the expectations for online engagement have changed since the days of the static, one-size fits all website. With these changes have come some very difficult organizational challenges as well. Today, as a business user, you want to engage with your customers, and your customers expect you to know who they are. They expect you to recall the details they’ve provided to you on your website, to your CSRs and to your sales people. They expect you to remember their purchases, their preferences and their problems. And they expect you to know who they are, equally well, across channels, including your web presence. This creates a host of challenges for today’s business users. Delivering targeted, relevant content online is now essential for converting prospects into customers and for engendering long term loyalty. Business users need the ability to leverage customer data from different sources to fuel their segmentation and targeting strategies and to easily set-up, manage and optimize online campaigns. Also critical, they need the ability to accomplish these things on-the-fly, at the speed of the marketplace, while making iterative improvements.  These changing expectations put a host of demands on the IT organization as well. The web presence must be able to scale to support the delivery of personalized and targeted content to thousands of site visitors without sacrificing performance. And integration between systems becomes more important as well, as organizations strive to obtain one view of the customer culled from WCM data, CRM data and more. So then, how do you solve these challenges and meet the growing demands of your users?  You need a solution that: Unifies every customer interaction across all channels Personalizes the products and content that interest the customer and to the device Delivers targeted promotions to the right customer Engages and improve employee productivity Provides self-service access to applications Includes embedded in-context social   So how then do you achieve this level of online engagement, complete customer experience and engage your employees? The answer: Oracle WebCenter. If you want to learn how to get there, we encourage you to attend this webcast on Thursday Drive Online Engagement with Intuitive Portals and Websites, where we'll talk about how you are able to transform your portal experience and optimize online engagement -- making your portals more interactive and more engaging across multiple channels. Register today!

    Read the article

  • Linq to Sql saying that item by 'Customer' already exists. Choose a different name.

    - by Anthony Potts
    I have been going round and round with a linq to sql file while using svn for quite some time. The latest is that my dbml file shows as having an error which states that An item named "Customer" already exists. Please choose a different name. And then it repeats that again. In fact, it says it for almost every object. What is my fix? I have tried renaming the one named Customer, but that didn't fix it. I don't know where to go to fix this. I went to the .dbml file and don't see any duplication, and I went to the .dbml.layout file and didn't see any duplication there either.

    Read the article

  • query to return three records for each customer application based on the options declared in the pre

    - by kumarreddy
    tables look like this table1---customer application columns--- application id--primary key, name, ssn, ... ... table2----balance(actually its a view) columns--- amount balance, application id ...... ...... table3 ---- options columns--- optionid, option value(1,2,3,4), ...... ........ .... table4 ----- ratios columns--- ratios id, option value, ratio value, applicationid(have to think about it), ........ table 4(detail) option value, Ratios 1 ----- 30 1 ----- 40 1 ----- 30 2 ---- 100 2 ----- 0 2 ------ 0 3 ---- 60 3 ------ 30 3 ----- 10 4 ---- 50 4 ----- 30 4 ----- 20 as is the case...now i need to get three records for each customer application with varying balances in proportion of ratios declared in table 4 corresponding to option values...... plz let me know where i was unclear about returning records thanks in advance

    Read the article

  • how to create stub DNS zone for emulating my customer production environment ?

    - by Albert Widjaja
    Hi All, Is it possible to emulate my customer production environment inside my AD domain by just creating the same domain inside my primary DNS server ? Can I created mycustomer.com DNS zone (STUB) just for the sake of listing few database servers and application servers and then for the other DNS records eg. MX, NS and the other refer to the REAL MX record entry so that my Exchange Server email flow is unaffected to mycustomer.com ? because if I just create A record in my current domain for some of the servers, the FQDN is not exactly what I want. Thanks.

    Read the article

  • Why doesnt file uploads work for a specific customer?

    - by nimo9367
    We have for some time now experienced some unexplainable behavior when a certain customer is trying to upload files to our web based application using a standard web form. It's a CGI based application and the server is running IIS6. However it works fine for all of our other customers using the same server and application so this must be a client side related issue? The request basically times out and you get to "page cannot be displayed". Does anyone have any idea of what might be the source of this problem?

    Read the article

  • Resolve Instructional Webcast Series

    - by Get Proactive Customer Adoption Team
    Untitled Document Catch the Express—Register for an Instructional Webcast Oracle Proactive Support’s ‘Get Proactive’ message to customers underscores the benefits they’ll obtain by leveraging the Prevent, Resolve and Upgrade capabilities available across the suite of Oracle Products. Our goal in Proactive Support is to show customers how to ‘Get Proactive’ and achieve success by leveraging the latest tools, knowledge, and best practices available to manage your applications and technology more proactively. Most importantly, we want to ensure that customers are proficient in the use of these proactive capabilities. To help you gain this proficiency, we’ve recently launched a series of instructional webcasts that we call the “Resolve Series.” This series consists of both live and on-demand webcasts, and features some of the key proactive capabilities that customers can leverage to resolve their own problems. We launched the first phase of the series in July, and focused on finding answers using the My Oracle Support portal. Among the topics covered in those sessions were best practices for searching the knowledge base, leveraging communities to find answers faster, and other proactive features of My Oracle Support The second phase of the series is set to kick off in September. This phase will include product specific sessions designed to provide customers who use the product with the skills and knowledge required to leverage some of the most important capabilities found under the “RESOLVE” category of our proactive portfolio on My Oracle Support. These webcasts will feature Subject Matter Experts demonstrating how to use the tools and capabilities, discussing best practices, and providing answers to any questions you might have. In addition, hands-on labs will be included in some of the sessions, allowing you to practice applying what you’ve just learned. Whether you are a new customer or you’ve worked with Oracle Support for years, you’ll discover new information and techniques to help you work more efficiently and keep your systems running smoothly. Leverage this opportunity to learn best practices and get the inside track on finding answers fast by using the right tools at the right time. Make sure to take advantage of these webcasts and maximize the value you receive from your Oracle Premier Support investment. See the full schedule of events and register for sessions.

    Read the article

  • What is the object of the Contact application search option ?

    - by Spredzy
    Hi all, I am wondering what is the kind of object that shows up when in the Contact application, you hit search option, what is it ? a Custom Quick Search Bar, a custom notificaction bar, other idea ... An image of what I am talking about is available here : http://www.developpez.net/forums/attachments/p60921d1270798944/java/general-java/java-mobiles/android/cet-objet-image-jointe/screen-shot-2010-04-09-at-9.37.38-am.png/ Thank you all

    Read the article

  • how can I Replace a normalize job title in a contact entity based on a lookup enity

    - by Jarkley
    Folks, Im using MSCRM 4 and I have a contact entity with an actual job title and a normalized job title field. I would like to populate the normalized job title field based on the actual job title. I created a seperate entity which is a table that corelates the nomalized job title with the actual job title eg Administrative CFO equals CFO. I guess this needs to be done via an on-load or on-save script But I cant figure out how to do it. Any help would be much appreciated Regards Joe ( Scotland)

    Read the article

  • How can I present a modal view controller after selecting a contact?

    - by barfoon
    Hey everyone, I'm trying to present a modal view controller after selecting a contact and it doesnt seem to be working. In my - (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person method, I dismiss peoplePicker, create an instance of my new view controller, then present it with [self.navigationController presentModalViewController:newController animated:YES]; and it doesnt work. However if i PUSH the view controller it works with this code: [self.navigationController pushViewController:newController animated:YES]; How can I accomplish this? Thank you,

    Read the article

  • how to write the SPQuery for getting all data of contact list?

    - by Lalit
    Hi, I am writing the SPQuery for getting the data in contact list of sharepoint site.but how to write that? Means I want to retrieve data as : Name:aaa Cell No: 13123131 Address : something address here.. so on... of given LAst Name in search text box (build by me). how to do that? Means what query i have to write? (Syntax please).

    Read the article

  • which algorithm will be appropriately used for contact intimacy? [closed]

    - by bigjava
    i need to implement a project with visual intimacy between persons,can anyone recommends an algorithm for person's intimacy in phone contact? intimacy attenuate over time(the intimacy attenuates automatically if you havnt click/dial it for a long time). Assume in my address book: Person Intimacy(0-100%) A 40% B 80% C 10% A's intimacy needs raise after i call A ,like this Person Intimacy(0-100%) A 42% B 80% C 10% nothing happens after follow 5 days, A,B,C's intimacy need decline,like this Person Intimacy(0-100%) A 37% B 78% C 8% thanks for everyone's answer

    Read the article

  • SEO - Delimiter character for page title

    - by cept0
    I have noticed a few oddities recently with the titles of web pages in SERPs. However, it seems there are several main conventions: Contact Page - Joe Schmoe's Awesome Site // &#045; Hyphen Contact Page — Joe Schmoe's Awesome Site // &mdash; Em dash Contact Page | Joe Schmoe's Awesome Site // &#x007C; Vertical bar Contact Page « Joe Schmoe's Awesome Site // &laquo; Left double angle quotes Is there any reason to use one over the other?

    Read the article

  • What I like about WIF&rsquo;s Claims-based Authorization

    - by Your DisplayName here!
    In “traditional” .NET with its IPrincipal interface and IsInRole method, developers were encouraged to write code like this: public void AddCustomer(Customer customer) {     if (Thread.CurrentPrincipal.IsInRole("Sales"))     {         // add customer     } } In code reviews I’ve seen tons of code like this. What I don’t like about this is, that two concerns in your application get tightly coupled: business and security logic. But what happens when the security requirements change – and they will (e.g. members of the sales role and some other people from different roles need to create customers)? Well – since your security logic is sprinkled across your project you need to change the security checks in all relevant places (and make sure you don’t forget one) and you need to re-test, re-stage and re-deploy the complete app. This is clearly not what we want. WIF’s claims-based authorization encourages developers to separate business code and authorization policy evaluation. This is a good thing. So the same security check with WIF’s out-of-the box APIs would look like this: public void AddCustomer(Customer customer) {     try     {         ClaimsPrincipalPermission.CheckAccess("Customer", "Add");           // add customer     }     catch (SecurityException ex)     {         // access denied     } } You notice the fundamental difference? The security check only describes what the code is doing (represented by a resource/action pair) – and does not state who is allowed to invoke the code. As I mentioned earlier – the who is most probably changing over time – the what most probably not. The call to ClaimsPrincipalPermission hands off to another class called the ClaimsAuthorizationManager. This class handles the evaluation of your security policy and is ideally in a separate assembly to allow updating the security logic independently from the application logic (and vice versa). The claims authorization manager features a method called CheckAccess that retrieves three values (wrapped inside an AuthorizationContext instance) – action (“add”), resource (“customer”) and the principal (including its claims) in question. CheckAccess then evaluates those three values and returns true/false. I really like the separation of concerns part here. Unfortunately there is not much support from Microsoft beyond that point. And without further tooling and abstractions the CheckAccess method quickly becomes *very* complex. But still I think that is the way to go. In the next post I will tell you what I don’t like about it (and how to fix it).

    Read the article

  • How to model a many to many from a DDD perspective in UML?

    - by JD01
    I have a two entity objects Site and Customer where there is a many to many relationship. I have read you try not to model this in DDD as it is in the data model and go for a unidirectional flow. If I wanted to show this in UML, would I show it as it is in the data model: Site * ----->*Customer but the direction arrow gives the flow? or as following Site ----->*Customer But then this would imply that Customer can only go in one site.

    Read the article

  • MVC Razor Engine For Beginners Part 1

    - by Humprey Cogay, C|EH, E|CSA
    I. What is MVC? a. http://www.asp.net/mvc/tutorials/older-versions/overview/asp-net-mvc-overview II. Software Requirements for this tutorial a. Visual Studio 2010/2012. You can get your free copy here Microsoft Visual Studio 2012 b. MVC Framework Option 1 - Install using a standalone installer http://www.microsoft.com/en-us/download/details.aspx?id=30683 Option 2 - Install using Web Platform Installer http://www.microsoft.com/web/handlers/webpi.ashx?command=getinstallerredirect&appid=MVC4VS2010_Loc III. Creating your first MVC4 Application a. On the Visual Studio click file new solution link b. Click Other Project Type>Visual Studio Solutions and on the templates window select blank solution and let us name our solution MVCPrimer. c. Now Click File>New and select Project d. Select Visual C#>Web> and select ASP.NET MVC 4 Web Application and Enter MyWebSite as Name e. Select Empty, Razor as view engine and uncheck Create a Unit test project f. You can now view a basic MVC 4 Application Structure on your solution explorer g. Now we will add our first controller by right clicking on the controllers folder on your solution explorer and select Add>Controller h. Change the name of the controller to HomeController and under the scaffolding options select Empty MVC Controller. i. You will now see a basic controller with an Index method that returns an ActionResult j. We will now add a new View Folder for our Home Controller. Right click on the views folder on your solution explorer and select Add> New Folder> and name this folder Home k. Add a new View by right clicking on Views>Home Folder and select Add View. l. Name the view Index, and select Razor(CSHTML) as View Engine, All checkbox should be unchecked for now and click add. m. Relationship between our HomeController and Home Views Sub Folder n. Add new HTML Contents to our newly created Index View o. Press F5 to run our MVC Application p. We will create our new model, Right click on the models folder of our solution explorer and select Add> Class. q. Let us name our class Customer r. Edit the Customer class with the following code s. Open the HomeController by double clickin HomeController of our Controllers folder and edit the HomeControllerusing System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc;   namespace MyWebSite.Controllers {     public class HomeController : Controller     {         //         // GET: /Home/           public ActionResult Index()         {             return View();         }           public ActionResult ListCustomers()         {             List<Models.Customer> customers = new List<Models.Customer>();               //Add First Customer to Our Collection             customers.Add(new Models.Customer()                     {                         Id = 1,                         CompanyName = "Volvo",                         ContactNo = "123-0123-0001",                         ContactPerson = "Gustav Larson",                         Description = "Volvo Car Corporation, or Volvo Personvagnar AB, is a Scandinavian automobile manufacturer founded in 1927"                     });                 //Add Second Customer to Our Collection             customers.Add(new Models.Customer()                     {                         Id = 2,                         CompanyName = "BMW",                         ContactNo = "999-9876-9898",                         ContactPerson = "Franz Josef Popp",                         Description = "Bayerische Motoren Werke AG,  (BMW; English: Bavarian Motor Works) is a " +                                       "German automobile, motorcycle and engine manufacturing company founded in 1917. "                     });                 //Add Third Customer to Our Collection             customers.Add(new Models.Customer()             {                 Id = 3,                 CompanyName = "Audi",                 ContactNo = "983-2222-1212",                 ContactPerson = "Karl Benz",                 Description = " is a multinational division of the German manufacturer Daimler AG,"             });               return View(customers);         }     } } t. Let us now create a view for this Class, But before continuing Press Ctrl + Shift + B to rebuild the solution, this will make the previously created model on the Model class drop down of the Add View Menu. Right click on the views>Home folder and select Add>View u. Let us name our View as ListCustomers, Select Razor(CSHTML) as View Engine, Put a check mark on Create a strongly-typed view, and select Customer (MyWebSite.Models) as model class. Slect List on the Scaffold Template and Click OK. v. Run the MVC Application by pressing F5, and on the address bar insert Home/ListCustomers, We should now see a web page similar below.   x. You can edit ListCustomers.CSHTML to remove and add HTML codes @model IEnumerable<MyWebSite.Models.Customer>   @{     Layout = null; }   <!DOCTYPE html>   <html> <head>     <meta name="viewport" content="width=device-width" />     <title>ListCustomers</title> </head> <body>     <h2>List of Customers</h2>     <table border="1">         <tr>             <th>                 @Html.DisplayNameFor(model => model.CompanyName)             </th>             <th>                 @Html.DisplayNameFor(model => model.Description)             </th>             <th>                 @Html.DisplayNameFor(model => model.ContactPerson)             </th>             <th>                 @Html.DisplayNameFor(model => model.ContactNo)             </th>         </tr>         @foreach (var item in Model) {         <tr>             <td>                 @Html.DisplayFor(modelItem => item.CompanyName)             </td>             <td>                 @Html.DisplayFor(modelItem => item.Description)             </td>             <td>                 @Html.DisplayFor(modelItem => item.ContactPerson)             </td>             <td>                 @Html.DisplayFor(modelItem => item.ContactNo)             </td>                   </tr>     }         </table> </body> </html> y. Press F5 to run the MVC Application   z. You will notice some @HTML.DisplayFor codes. These are called HTML Helpers you can read more about HTML Helpers on this site http://www.w3schools.com/aspnet/mvc_htmlhelpers.asp   That’s all. You now have your first MVC4 Razor Engine Web Application . . .

    Read the article

< Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >